aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm
diff options
context:
space:
mode:
authorColy Li <coyli@suse.de>2008-11-16 23:38:22 -0500
committerMark Fasheh <mfasheh@suse.com>2008-12-01 17:46:55 -0500
commit07d9a3954a68764aefe16855bcd0f86deeb5c825 (patch)
tree16721b539e67d78eee336f124a89b9a089175773 /fs/ocfs2/dlm
parenta2eee69b814854095ed835a6eb64b8efc220cd6a (diff)
ocfs2: fix return value set in init_dlmfs_fs()
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>
Diffstat (limited to 'fs/ocfs2/dlm')
-rw-r--r--fs/ocfs2/dlm/dlmfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index 533a789c3ef8..ba962d71b34d 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
608 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| 608 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
609 SLAB_MEM_SPREAD), 609 SLAB_MEM_SPREAD),
610 dlmfs_init_once); 610 dlmfs_init_once);
611 if (!dlmfs_inode_cache) 611 if (!dlmfs_inode_cache) {
612 status = -ENOMEM;
612 goto bail; 613 goto bail;
614 }
613 cleanup_inode = 1; 615 cleanup_inode = 1;
614 616
615 user_dlm_worker = create_singlethread_workqueue("user_dlm"); 617 user_dlm_worker = create_singlethread_workqueue("user_dlm");