All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs()
@ 2008-11-17  4:38 Coly Li
  2008-11-17 19:05 ` Sunil Mushran
  2008-11-19 16:34 ` Mark Fasheh
  0 siblings, 2 replies; 3+ messages in thread
From: Coly Li @ 2008-11-17  4:38 UTC (permalink / raw)
  To: ocfs2-devel

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>
---
 fs/ocfs2/dlm/dlmfs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index 533a789..ba962d7 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -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");

-- 
Coly Li
SuSE PRC Labs

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs()
  2008-11-17  4:38 [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs() Coly Li
@ 2008-11-17 19:05 ` Sunil Mushran
  2008-11-19 16:34 ` Mark Fasheh
  1 sibling, 0 replies; 3+ messages in thread
From: Sunil Mushran @ 2008-11-17 19:05 UTC (permalink / raw)
  To: ocfs2-devel

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>


Coly Li wrote:
> 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>
> ---
>  fs/ocfs2/dlm/dlmfs.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
> index 533a789..ba962d7 100644
> --- a/fs/ocfs2/dlm/dlmfs.c
> +++ b/fs/ocfs2/dlm/dlmfs.c
> @@ -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");
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs()
  2008-11-17  4:38 [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs() Coly Li
  2008-11-17 19:05 ` Sunil Mushran
@ 2008-11-19 16:34 ` Mark Fasheh
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2008-11-19 16:34 UTC (permalink / raw)
  To: ocfs2-devel

On Mon, Nov 17, 2008 at 12:38:22PM +0800, Coly Li wrote:
> 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:".

Thanks, this is in ocfs2.git now.
	--Mark


--
Mark Fasheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-19 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17  4:38 [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs() Coly Li
2008-11-17 19:05 ` Sunil Mushran
2008-11-19 16:34 ` Mark Fasheh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.