From: piaojun <piaojun@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] fix a compiling warning
Date: Mon, 7 May 2018 08:52:49 +0800 [thread overview]
Message-ID: <5AEFA361.8060400@huawei.com> (raw)
In-Reply-To: <20180506094903.4331-1-lchen@suse.com>
Hi Larry,
'had_lock' will be initialized by ocfs2_inode_lock_tracker(), and the
'bail' branch above won't use it either as 'inode_locked' is still zero.
thanks,
Jun
On 2018/5/6 17:49, Larry Chen wrote:
> The variable had_lock might be used uninitialized.
>
> Signed-off-by: Larry Chen <lchen@suse.com>
> ---
> fs/ocfs2/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
> index 6ee94bc23f5b..50f17f56db36 100644
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -1133,7 +1133,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
> handle_t *handle = NULL;
> struct dquot *transfer_to[MAXQUOTAS] = { };
> int qtype;
> - int had_lock;
> + int had_lock = 0;
> struct ocfs2_lock_holder oh;
>
> trace_ocfs2_setattr(inode, dentry,
>
next parent reply other threads:[~2018-05-07 0:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180506094903.4331-1-lchen@suse.com>
2018-05-07 0:52 ` piaojun [this message]
2018-05-07 3:06 ` [Ocfs2-devel] [PATCH] fix a compiling warning Larry Chen
2018-05-08 15:10 ` Changwei Ge
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=5AEFA361.8060400@huawei.com \
--to=piaojun@huawei.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.