Skip to content

Commit

Permalink
[PATCH] reiserfs: remove d_splice_alias NULL check from reiserfs_lookup
Browse files Browse the repository at this point in the history
Remove redundant NULL check in reiserfs_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 2ff6b1c commit d9975d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/reiserfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,7 @@ static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry,
return ERR_PTR(-EIO);
}

if (inode)
return d_splice_alias(inode, dentry);

d_add(dentry, inode);
return NULL;
return d_splice_alias(inode, dentry);
}

/*
Expand Down

0 comments on commit d9975d6

Please sign in to comment.