Skip to content

Commit

Permalink
[PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pekka Enberg authored and Linus Torvalds committed Jan 15, 2006
1 parent 505970b commit 082a05c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ext2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 082a05c

Please sign in to comment.