Skip to contentSkip to conversation

vfs: remove unneeded unlikely()

PATCH New Hirofumi Nakagawa 1 participant 2 messages Sep 25, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 vfs: remove unneeded unlikely()

IS_ERR() macro it is already including unlikely().

---
 fs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c +1 -1
index c75ea03ca147..00384488fda1 100644
@@ -3458,7 +3458,7 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
 		goto out;
 	child = vfs_tmpfile(path.dentry, op->mode, op->open_flag);
 	error = PTR_ERR(child);
-	if (unlikely(IS_ERR(child)))
+	if (IS_ERR(child))
 		goto out2;
 	dput(path.dentry);
 	path.dentry = child;
Signature · 1 line
2.14.1
#1 lore raw

PATCH 2/2 pstore: remove unneeded unlikely()

IS_ERR() macro it is already including unlikely().

---
 fs/pstore/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/platform.c +1 -1
index 2b21d180157c..7256149af306 100644
@@ -654,7 +654,7 @@ static int pstore_write_user_compat(struct pstore_record *record,
 		return -EINVAL;
 
 	record->buf = memdup_user(buf, record->size);
-	if (unlikely(IS_ERR(record->buf))) {
+	if (IS_ERR(record->buf)) {
 		ret = PTR_ERR(record->buf);
 		goto out;
 	}
Signature · 1 line
2.14.1