Skip to content

Commit

Permalink
fs: remove unlikely() from WARN_ON() condition
Browse files Browse the repository at this point in the history
"unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely()
internally.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Denis Efremov <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
evdenis authored and torvalds committed Sep 26, 2019
1 parent 89f4035 commit 7159d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static int do_dentry_open(struct file *f,
f->f_mode |= FMODE_ATOMIC_POS;

f->f_op = fops_get(inode->i_fop);
if (unlikely(WARN_ON(!f->f_op))) {
if (WARN_ON(!f->f_op)) {
error = -ENODEV;
goto cleanup_all;
}
Expand Down

0 comments on commit 7159d54

Please sign in to comment.