From: Pekka Enberg Date: Sat, 14 Jan 2006 21:21:07 +0000 (-0800) Subject: [PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup X-Git-Tag: v2.6.16-rc1~133 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=082a05c6f02e00982dd42ddae434fbc806a822e5;p=linux-2.6 [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 --- diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index c5513953c8..ad1432a2a6 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)