]> err.no Git - linux-2.6/commitdiff
[PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup
authorPekka Enberg <penberg@cs.helsinki.fi>
Sat, 14 Jan 2006 21:21:07 +0000 (13:21 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 15 Jan 2006 02:27:10 +0000 (18:27 -0800)
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>
fs/ext2/namei.c

index c5513953c825daccbfbfae119e71bec81dec63c0..ad1432a2a62ee85eeef7bfaea49d142c1161af08 100644 (file)
@@ -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)