Skip to content

Commit

Permalink
deuglify squashfs_lookup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Jul 20, 2011
1 parent 5b4b299 commit 0c1aa9a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/squashfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c1aa9a

Please sign in to comment.