diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index c5513953c825daccbfbfae119e71bec81dec63c0..ad1432a2a62ee85eeef7bfaea49d142c1161af08 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -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)