From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: fix return value set in init_dlmfs_fs()
Date: Mon, 17 Nov 2008 11:05:01 -0800 [thread overview]
Message-ID: <4921C05D.2060407@oracle.com> (raw)
In-Reply-To: <4920F53E.5010800@suse.de>
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");
>
>
next prev parent reply other threads:[~2008-11-17 19:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-11-19 16:34 ` Mark Fasheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4921C05D.2060407@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.