]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ocfs2: fix return value set in init_dlmfs_fs()
authorColy Li <coyli@suse.de>
Mon, 17 Nov 2008 04:38:22 +0000 (12:38 +0800)
committerMark Fasheh <mfasheh@suse.com>
Mon, 1 Dec 2008 22:46:55 +0000 (14:46 -0800)
In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from
calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:".

Signed-off-by: Coly Li <coyli@suse.de>
Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/dlm/dlmfs.c

index 533a789c3ef8e01872bb44e7a7d989c70e0e0f06..ba962d71b34d15e7e089c741a9d6bd0d14559e79 100644 (file)
@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
                                0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
                                        SLAB_MEM_SPREAD),
                                dlmfs_init_once);
-       if (!dlmfs_inode_cache)
+       if (!dlmfs_inode_cache) {
+               status = -ENOMEM;
                goto bail;
+       }
        cleanup_inode = 1;
 
        user_dlm_worker = create_singlethread_workqueue("user_dlm");