9p: Use BUG_ON instead of if condition followed by BUG.
PATCH 1/1 9p: Use BUG_ON instead of if condition followed by BUG.
From: Zhang Mingyu <[email protected]>
This issue was detected with the help of Coccinelle.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Zhang Mingyu <[email protected]>
--- fs/9p/vfs_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/9p/vfs_file.c +1 -2
@@ -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 )
Signature · 1 line
2.25.1
[email protected]
maintainer[email protected] wrote on Fri, Nov 12, 2021 at 09:25:47AM +0000:
Quoted 6 lines
From: Zhang Mingyu <[email protected]>
This issue was detected with the help of Coccinelle.
Reported-by Zeal Robot <[email protected]>Signed-off-by Zhang Mingyu <[email protected]>
I realize I've never replied to this mail when applying old patches now, I've picked this up too.
Quoted 18 lines
--- fs/9p/vfs_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/9p/vfs_file.c +1
-2@@ -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 )
Signature · 1 line
Dominique