Skip to content

Commit 0c1aa9a

Browse files
author
Al Viro
committed
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 <[email protected]>
1 parent 5b4b299 commit 0c1aa9a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/squashfs/namei.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
232232

233233
exit_lookup:
234234
kfree(dire);
235-
if (inode)
236-
return d_splice_alias(inode, dentry);
237-
d_add(dentry, inode);
238-
return ERR_PTR(0);
235+
return d_splice_alias(inode, dentry);
239236

240237
data_error:
241238
err = -EIO;

0 commit comments

Comments
 (0)