mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
[PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup
Remove redundant NULL check in ext2_lookup() as d_splice_alias() can take NULL inode as input. Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
505970b96e
commit
082a05c6f0
1 file changed
+1
-4
+1
-4
@@ -83,10 +83,7 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str
|
||||
if (!inode)
|
||||
return ERR_PTR(-EACCES);
|
||||
}
|
||||
if (inode)
|
||||
return d_splice_alias(inode, dentry);
|
||||
d_add(dentry, inode);
|
||||
return NULL;
|
||||
return d_splice_alias(inode, dentry);
|
||||
}
|
||||
|
||||
struct dentry *ext2_get_parent(struct dentry *child)
|
||||
|
||||
Reference in new issue
Block a user