Skip to content

Commit

Permalink
ufs should use d_splice_alias()
Browse files Browse the repository at this point in the history
it's NFS-exportable, so...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 18, 2011
1 parent a803b80 commit 642c937
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions fs/ufs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,12 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru

lock_ufs(dir->i_sb);
ino = ufs_inode_by_name(dir, &dentry->d_name);
if (ino) {
if (ino)
inode = ufs_iget(dir->i_sb, ino);
if (IS_ERR(inode)) {
unlock_ufs(dir->i_sb);
return ERR_CAST(inode);
}
}
unlock_ufs(dir->i_sb);
d_add(dentry, inode);
return NULL;
if (IS_ERR(inode))
return ERR_CAST(inode);
return d_splice_alias(inode, dentry);
}

/*
Expand Down

0 comments on commit 642c937

Please sign in to comment.