mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
bfs_lookup(): use d_splice_alias()
code is actually simpler that way. Acked-by: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
837f3ec692
commit
a596a23b9a
@ -141,14 +141,9 @@ static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
unsigned long ino = (unsigned long)le16_to_cpu(de->ino);
|
||||
brelse(bh);
|
||||
inode = bfs_iget(dir->i_sb, ino);
|
||||
if (IS_ERR(inode)) {
|
||||
mutex_unlock(&info->bfs_lock);
|
||||
return ERR_CAST(inode);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&info->bfs_lock);
|
||||
d_add(dentry, inode);
|
||||
return NULL;
|
||||
return d_splice_alias(inode, dentry);
|
||||
}
|
||||
|
||||
static int bfs_link(struct dentry *old, struct inode *dir,
|
||||
|
Loading…
Reference in New Issue
Block a user