fs: remove unlikely() from WARN_ON() condition

"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]>
This commit is contained in:
Denis Efremov 2019-09-25 16:49:31 -07:00 • committed by Linus Torvalds
commit 7159d54418

View file

@ -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;
}