public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hugetlbfs: add err code in initializing module
@ 2012-03-11  5:09 Hillf Danton
  2012-03-11  5:21 ` Hillf Danton
  2012-03-22  0:33 ` Al Viro
  0 siblings, 2 replies; 10+ messages in thread
From: Hillf Danton @ 2012-03-11  5:09 UTC (permalink / raw)
  To: LKML; +Cc: Al Viro, Andrew Morton, Hillf Danton

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.

--- 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)
--

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-28 12:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-11  5:09 [PATCH] hugetlbfs: add err code in initializing module Hillf Danton
2012-03-11  5:21 ` Hillf Danton
2012-03-11 20:25   ` David Rientjes
2012-03-12 12:01     ` Hillf Danton
2012-03-12 21:38       ` David Rientjes
2012-03-12 23:58       ` Andrew Morton
2012-03-22  0:33 ` Al Viro
2012-03-22 13:26   ` Hillf Danton
2012-03-28  7:24     ` David Rientjes
2012-03-28 12:40       ` Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox