diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-17 16:07:34 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-18 05:21:35 +0200 |
commit | 642c937b4ed2e51d2f2e4c46ab7cd8b5bddf268b (patch) | |
tree | 37a1346f5a907ed052bd5f5ab44a3e6668cc12d3 | |
parent | fix exofs ->get_parent() (diff) | |
download | linux-642c937b4ed2e51d2f2e4c46ab7cd8b5bddf268b.tar.xz linux-642c937b4ed2e51d2f2e4c46ab7cd8b5bddf268b.zip |
ufs should use d_splice_alias()
it's NFS-exportable, so...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/ufs/namei.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 29309e25417f..b57aab9a1184 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -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); } /* |