lkml.org 
[lkml]   [2012]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] hugetlbfs: add err code in initializing module
From
Error code is added if fail to create inode kmem cache, and newly registered
hugetlb FS is unregistered if fail to mount, both for unlikely corner cases.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/fs/hugetlbfs/inode.c Sun Mar 11 12:46:38 2012
+++ b/fs/hugetlbfs/inode.c Sun Mar 11 12:49:28 2012
@@ -1000,6 +1000,7 @@ static int __init init_hugetlbfs_fs(void
hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache",
sizeof(struct hugetlbfs_inode_info),
0, 0, init_once);
+ error = -ENOMEM;
if (hugetlbfs_inode_cachep == NULL)
goto out2;

@@ -1015,6 +1016,7 @@ static int __init init_hugetlbfs_fs(void
}

error = PTR_ERR(vfsmount);
+ unregister_filesystem(&hugetlbfs_fs_type);

out:
if (error)
--

\
 
 \ /
  Last update: 2012-03-11 06:25    [W:0.077 / U:26.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site