[PATCH] ext2: remove d_splice_alias NULL check from ext2_lookup

From: Pekka J Enberg
Date: Thu Jan 12 2006 - 09:55:54 EST


From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---

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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/