]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Coly Li <coyli@suse.de> |
2 | Date: Mon, 17 Nov 2008 12:38:22 +0800 | |
3 | Subject: ocfs2: fix return value set in init_dlmfs_fs() | |
4 | ||
5 | In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from | |
6 | calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:". | |
7 | ||
8 | Signed-off-by: Coly Li <coyli@suse.de> | |
9 | Acked-by: Sunil Mushran <sunil.mushran@oracle.com> | |
10 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
11 | --- | |
12 | fs/ocfs2/dlm/dlmfs.c | 4 +++- | |
13 | 1 files changed, 3 insertions(+), 1 deletions(-) | |
14 | ||
15 | Index: 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"); |