mirror of https://gitee.com/openkylin/linux.git
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/20190829165025.15750-5-efremov@linux.com Signed-off-by: Denis Efremov <efremov@linux.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
89f4035413
commit
7159d54418
|
@ -776,7 +776,7 @@ static int do_dentry_open(struct file *f,
|
||||||
f->f_mode |= FMODE_ATOMIC_POS;
|
f->f_mode |= FMODE_ATOMIC_POS;
|
||||||
|
|
||||||
f->f_op = fops_get(inode->i_fop);
|
f->f_op = fops_get(inode->i_fop);
|
||||||
if (unlikely(WARN_ON(!f->f_op))) {
|
if (WARN_ON(!f->f_op)) {
|
||||||
error = -ENODEV;
|
error = -ENODEV;
|
||||||
goto cleanup_all;
|
goto cleanup_all;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue