9p: Use BUG_ON instead of if condition followed by BUG.
This issue was detected with the help of Coccinelle. Link: https://lkml.kernel.org/r/20211112092547.9153-1-zhang.mingyu@zte.com.cn Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
This commit is contained in:
parent
019641d1b5
commit
a7a427d154
@ -138,8 +138,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)
|
||||
|
Loading…
Reference in New Issue
Block a user