Messages in this thread Patch in this message | | | From | Denis Efremov <> | Subject | [PATCH v3 05/11] fs: remove unlikely() from WARN_ON() condition | Date | Thu, 29 Aug 2019 19:50:19 +0300 |
| |
"unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely() internally.
Signed-off-by: Denis Efremov <efremov@linux.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Joe Perches <joe@perches.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-fsdevel@vger.kernel.org --- fs/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/open.c b/fs/open.c index a59abe3c669a..9432cd5a8294 100644 --- a/fs/open.c +++ b/fs/open.c @@ -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; } -- 2.21.0
| |