* [PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup
@ 2006-01-12 14:57 Pekka J Enberg
0 siblings, 0 replies; only message in thread
From: Pekka J Enberg @ 2006-01-12 14:57 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
From: Pekka Enberg <penberg@cs.helsinki.fi>
This patch removes 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>
---
fs/ext2/namei.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Index: 2.6/fs/ext2/namei.c
===================================================================
--- 2.6.orig/fs/ext2/namei.c
+++ 2.6/fs/ext2/namei.c
@@ -83,10 +83,7 @@ static struct dentry *ext2_lookup(struct
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-12 14:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-12 14:57 [PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup Pekka J Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).