summaryrefslogtreecommitdiff
path: root/fs/ext2/namei.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2006-01-15 00:21:07 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-15 05:27:10 +0300
commit082a05c6f02e00982dd42ddae434fbc806a822e5 (patch)
treea26e7df9e311c2dce2fb739502656baeeb683d62 /fs/ext2/namei.c
parent505970b96e3b7d22177c38e03435a68376628e7a (diff)
downloadlinux-082a05c6f02e00982dd42ddae434fbc806a822e5.tar.xz
[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 <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r--fs/ext2/namei.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index c5513953c825..ad1432a2a62e 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)