Commit a7a427d1 authored by Zhang Mingyu's avatar Zhang Mingyu Committed by Dominique Martinet

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.cnReported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarZhang Mingyu <zhang.mingyu@zte.com.cn>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent 019641d1
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment