Messages in this thread | | | Date | Mon, 12 Mar 2012 14:38:45 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [PATCH] hugetlbfs: add err code in initializing module |
| |
On Mon, 12 Mar 2012, Hillf Danton wrote:
> From: Hillf Danton <dhillf@gmail.com> > Subject: [PATCH] hugetlbfs: add err code in initilizing module > > 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>
Acked-by: David Rientjes <rientjes@google.com>
> --- > > --- a/fs/hugetlbfs/inode.c Sun Mar 11 12:46:38 2012 > +++ b/fs/hugetlbfs/inode.c Mon Mar 12 19:52:16 2012 > @@ -997,6 +997,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); > @@ -1015,6 +1016,7 @@ static int __init init_hugetlbfs_fs(void > } > > error = PTR_ERR(vfsmount); > + unregister_filesystem(&hugetlbfs_fs_type); > > out: > if (error) > -- >
| |