From 8966c5e0fc867f5a7da5756b4cd1b8bbbed3d5dd Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 18 Aug 2008 15:36:47 +0100 Subject: [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup() Now that JFFS2 can be exported by NFS, we need to get this right. Signed-off-by: David Woodhouse Signed-off-by: Al Viro --- fs/jffs2/dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/jffs2') diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index b1aaae823a5..621bdfa994e 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -108,9 +108,7 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target, } } - d_add(target, inode); - - return NULL; + return d_splice_alias(inode, target); } /***********************************************************************/ -- cgit v1.2.3-18-g5258