From: Pekka Enberg Date: Sat, 14 Jan 2006 21:21:08 +0000 (-0800) Subject: [PATCH] ext3: remove d_splice_alias NULL check from ext3_lookup X-Git-Tag: firefly_0821_release~38868 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ba7fe369875075c3b0def9887afb7a44fa88175e;p=firefly-linux-kernel-4.4.55.git [PATCH] ext3: remove d_splice_alias NULL check from ext3_lookup Remove redundant NULL check in ext3_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 --- diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index af193a304ee5..8bd8ac077704 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1005,10 +1005,7 @@ static struct dentry *ext3_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); }