From: cgel.zte@gmail.com
To: ericvh@gmail.com
Cc: lucho@ionkov.net, asmadeus@codewreck.org,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Zhang Mingyu <zhang.mingyu@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH] 9p: Use BUG_ON instead of if condition followed by BUG.
Date: Fri, 12 Nov 2021 09:25:47 +0000 [thread overview]
Message-ID: <20211112092547.9153-1-zhang.mingyu@zte.com.cn> (raw)
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>
---
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)
--
2.25.1
next reply other threads:[~2021-11-12 9:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 9:25 cgel.zte [this message]
2021-12-18 11:16 ` asmadeus
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=20211112092547.9153-1-zhang.mingyu@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=asmadeus@codewreck.org \
--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
all inboxes | Powered by JetHome®