From 082a05c6f02e00982dd42ddae434fbc806a822e5 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sat, 14 Jan 2006 13:21:07 -0800 Subject: [PATCH] [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ext2/namei.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index c5513953c82..ad1432a2a62 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) -- 2.46.0