Skip to content

Commit 642c937

Browse files
author
Al Viro
committed
ufs should use d_splice_alias()
it's NFS-exportable, so... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a803b80 commit 642c937

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎fs/ufs/namei.c‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,12 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru
5656

5757
lock_ufs(dir->i_sb);
5858
ino = ufs_inode_by_name(dir, &dentry->d_name);
59-
if (ino) {
59+
if (ino)
6060
inode = ufs_iget(dir->i_sb, ino);
61-
if (IS_ERR(inode)) {
62-
unlock_ufs(dir->i_sb);
63-
return ERR_CAST(inode);
64-
}
65-
}
6661
unlock_ufs(dir->i_sb);
67-
d_add(dentry, inode);
68-
return NULL;
62+
if (IS_ERR(inode))
63+
return ERR_CAST(inode);
64+
return d_splice_alias(inode, dentry);
6965
}
7066

7167
/*

0 commit comments

Comments
 (0)