Skip to contentSkip to conversation

freevxfs_lookup(): use d_splice_alias()

RFC PATCH New Al Viro 1 participant 1 message May 13, 2018 VFS

lore
Share & tools
lore

Al Viro

author
#0 lore raw

RFC PATCH 1/1 freevxfs_lookup(): use d_splice_alias()

---
 fs/freevxfs/vxfs_lookup.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
fs/freevxfs/vxfs_lookup.c +2 -6
index ce4785fd81c6..a51425634f65 100644
@@ -193,13 +193,9 @@ vxfs_lookup(struct inode *dip, struct dentry *dp, unsigned int flags)
 		return ERR_PTR(-ENAMETOOLONG);
 				 
 	ino = vxfs_inode_by_name(dip, dp);
-	if (ino) {
+	if (ino)
 		ip = vxfs_iget(dip->i_sb, ino);
-		if (IS_ERR(ip))
-			return ERR_CAST(ip);
-	}
-	d_add(dp, ip);
-	return NULL;
+	return d_splice_alias(ip, dp);
 }
 
 /**
Signature · 1 line
2.11.0