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: MMI-PSA29.97-13-9~31125^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8966c5e0fc867f5a7da5756b4cd1b8bbbed3d5dd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 b1aaae823a52..621bdfa994e7 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); } /***********************************************************************/