Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07d9a395 authored by Coly Li's avatar Coly Li Committed by Mark Fasheh
Browse files

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: default avatarColy Li <coyli@suse.de>
Acked-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent a2eee69b
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
				0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
				0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
					SLAB_MEM_SPREAD),
					SLAB_MEM_SPREAD),
				dlmfs_init_once);
				dlmfs_init_once);
	if (!dlmfs_inode_cache)
	if (!dlmfs_inode_cache) {
		status = -ENOMEM;
		goto bail;
		goto bail;
	}
	cleanup_inode = 1;
	cleanup_inode = 1;


	user_dlm_worker = create_singlethread_workqueue("user_dlm");
	user_dlm_worker = create_singlethread_workqueue("user_dlm");