[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yb3DHNHjk0SwMJPU@codewreck.org>
Date: Sat, 18 Dec 2021 20:16:44 +0900
From: asmadeus@...ewreck.org
To: cgel.zte@...il.com
Cc: ericvh@...il.com, lucho@...kov.net,
v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Zhang Mingyu <zhang.mingyu@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] 9p: Use BUG_ON instead of if condition followed by BUG.
cgel.zte@...il.com wrote on Fri, Nov 12, 2021 at 09:25:47AM +0000:
> From: Zhang Mingyu <zhang.mingyu@....com.cn>
>
> This issue was detected with the help of Coccinelle.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Zhang Mingyu <zhang.mingyu@....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
Powered by blists - more mailing lists