]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/ocfs2-fix-return-value-set-in-init_dlmfs_fs.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / ocfs2-fix-return-value-set-in-init_dlmfs_fs.patch
CommitLineData
2cb7cef9
BS
1From: Coly Li <coyli@suse.de>
2Date: Mon, 17 Nov 2008 12:38:22 +0800
3Subject: ocfs2: fix return value set in init_dlmfs_fs()
4
5In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from
6calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:".
7
8Signed-off-by: Coly Li <coyli@suse.de>
9Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
10Signed-off-by: Mark Fasheh <mfasheh@suse.com>
11---
12 fs/ocfs2/dlm/dlmfs.c | 4 +++-
13 1 files changed, 3 insertions(+), 1 deletions(-)
14
15Index: linux-2.6.27-ocfs2/fs/ocfs2/dlm/dlmfs.c
16===================================================================
17--- linux-2.6.27-ocfs2.orig/fs/ocfs2/dlm/dlmfs.c
18+++ linux-2.6.27-ocfs2/fs/ocfs2/dlm/dlmfs.c
19@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
20 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
21 SLAB_MEM_SPREAD),
22 dlmfs_init_once);
23- if (!dlmfs_inode_cache)
24+ if (!dlmfs_inode_cache) {
25+ status = -ENOMEM;
26 goto bail;
27+ }
28 cleanup_inode = 1;
29
30 user_dlm_worker = create_singlethread_workqueue("user_dlm");