Skip to contentSkip to conversation

filesystems: remove unnecessary unlikely()

PATCH New Igor Stoppa 1 participant 1 message Sep 7, 2018 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 filesystems: remove unnecessary unlikely()

WARN_ON() already contains an unlikely(), so it's not necessary to wrap it into another.

---
 fs/open.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/open.c +1 -1
index 0285ce7dbd51..19a9e4b378d3 100644
@@ -750,7 +750,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;
 	}
Signature · 1 line
2.17.1