From: asmadeus@codewreck.org
To: cgel.zte@gmail.com
Cc: ericvh@gmail.com, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Zhang Mingyu <zhang.mingyu@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] 9p: Use BUG_ON instead of if condition followed by BUG.
Date: Sat, 18 Dec 2021 20:16:44 +0900 [thread overview]
Message-ID: <Yb3DHNHjk0SwMJPU@codewreck.org> (raw)
In-Reply-To: <20211112092547.9153-1-zhang.mingyu@zte.com.cn>
cgel.zte@gmail.com wrote on Fri, Nov 12, 2021 at 09:25:47AM +0000:
> From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
I realize I've never replied to this mail when applying old patches now,
I've picked this up too.
> ---
> fs/9p/vfs_file.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index 4244d48398ef..f2375448cafc 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -139,8 +139,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
> fid = filp->private_data;
> BUG_ON(fid == NULL);
>
> - if ((fl->fl_flags & FL_POSIX) != FL_POSIX)
> - BUG();
> + BUG_ON((fl->fl_flags & FL_POSIX) != FL_POSIX);
>
> res = locks_lock_file_wait(filp, fl);
> if (res < 0)
--
Dominique
prev parent reply other threads:[~2021-12-18 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 9:25 [PATCH] 9p: Use BUG_ON instead of if condition followed by BUG cgel.zte
2021-12-18 11:16 ` asmadeus [this message]
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=Yb3DHNHjk0SwMJPU@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=cgel.zte@gmail.com \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=zealci@zte.com.cn \
--cc=zhang.mingyu@zte.com.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).