Commit 082a05c6 authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds

[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: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 505970b9
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment