projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b69add2
)
hugetlbfs: return error code when initializing module
author
Hillf Danton
<
[email protected]
>
Wed, 21 Mar 2012 23:34:15 +0000
(16:34 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 22 Mar 2012 00:55:00 +0000
(17:55 -0700)
Return an errno upon failure to create inode kmem cache, and unregister
the FS upon failure to mount.
[
[email protected]
: remove unneeded test of `error']
Signed-off-by: Hillf Danton <
[email protected]
>
Acked-by: David Rientjes <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/hugetlbfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/hugetlbfs/inode.c
b/fs/hugetlbfs/inode.c
index 631329f3de63eb4e508f2c5eef5a23ad83db2f11..269163324b73c1811ba6f5e94f7aeed7f82a5755 100644
(file)
--- a/
fs/hugetlbfs/inode.c
+++ b/
fs/hugetlbfs/inode.c
@@
-1021,6
+1021,7
@@
static int __init init_hugetlbfs_fs(void)
if (error)
return error;
+ error = -ENOMEM;
hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache",
sizeof(struct hugetlbfs_inode_info),
0, 0, init_once);
@@
-1039,10
+1040,10
@@
static int __init init_hugetlbfs_fs(void)
}
error = PTR_ERR(vfsmount);
+ unregister_filesystem(&hugetlbfs_fs_type);
out:
- if (error)
- kmem_cache_destroy(hugetlbfs_inode_cachep);
+ kmem_cache_destroy(hugetlbfs_inode_cachep);
out2:
bdi_destroy(&hugetlbfs_backing_dev_info);
return error;