From: David Woodhouse Date: Mon, 18 Aug 2008 14:36:47 +0000 (+0100) Subject: [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup() X-Git-Tag: v2.6.28-rc1~24^2~18 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8966c5e0fc867f5a7da5756b4cd1b8bbbed3d5dd;p=linux-2.6-omap-h63xx.git [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 --- 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); } /***********************************************************************/