Skip to content

Commit

Permalink
ocfs2: fix return value set in init_dlmfs_fs()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Sunil Mushran <[email protected]>
Signed-off-by: Mark Fasheh <[email protected]>
  • Loading branch information
Coly Li authored and Mark Fasheh committed Dec 1, 2008
1 parent a2eee69 commit 07d9a39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ocfs2/dlm/dlmfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 07d9a39

Please sign in to comment.