Skip to content

Commit a7a427d

Browse files
Zhang Mingyumartinetd
authored andcommitted
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/[email protected] Reported-by: Zeal Robot <[email protected]> Signed-off-by: Zhang Mingyu <[email protected]> Signed-off-by: Dominique Martinet <[email protected]>
1 parent 019641d commit a7a427d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/9p/vfs_file.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
138138
fid = filp->private_data;
139139
BUG_ON(fid == NULL);
140140

141-
if ((fl->fl_flags & FL_POSIX) != FL_POSIX)
142-
BUG();
141+
BUG_ON((fl->fl_flags & FL_POSIX) != FL_POSIX);
143142

144143
res = locks_lock_file_wait(filp, fl);
145144
if (res < 0)

0 commit comments

Comments
 (0)