summaryrefslogtreecommitdiffstats
path: root/fs/squashfs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-09 02:57:47 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 07:44:24 +0200
commit0c1aa9a952c3608eb17bf990466f1491d1ee8b6c (patch)
tree93c044f5700db46f056fb7f57924ff9f9f8fee98 /fs/squashfs/namei.c
parentnfsd4_list_rec_dir(): don't bother with reopening rec_file (diff)
downloadlinux-0c1aa9a952c3608eb17bf990466f1491d1ee8b6c.tar.xz
linux-0c1aa9a952c3608eb17bf990466f1491d1ee8b6c.zip
deuglify squashfs_lookup()
d_splice_alias(NULL, dentry) is equivalent to d_add(dentry, NULL), NULL so no need for that if (inode) ... in there (or ERR_PTR(0), for that matter) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/squashfs/namei.c')
-rw-r--r--fs/squashfs/namei.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/squashfs/namei.c b/fs/squashfs/namei.c
index 4bc63ac64bc0..51b36958492b 100644
--- a/fs/squashfs/namei.c
+++ b/fs/squashfs/namei.c
@@ -232,10 +232,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
exit_lookup:
kfree(dire);
- if (inode)
- return d_splice_alias(inode, dentry);
- d_add(dentry, inode);
- return ERR_PTR(0);
+ return d_splice_alias(inode, dentry);
data_error:
err = -EIO;