From: David Woodhouse Subject: [JFFS2] Use d_splice_alias() not d_add() in jffs2_lookup() Date: Mon, 18 Aug 2008 15:36:47 +0100 Message-ID: <1219070207.3184.395.camel@pmac.infradead.org> References: <1218990078.3184.319.camel@pmac.infradead.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: viro@zeniv.linux.org.uk Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:49504 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbYHROgu (ORCPT ); Mon, 18 Aug 2008 10:36:50 -0400 In-Reply-To: <1218990078.3184.319.camel@pmac.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Now that JFFS2 can be exported by NFS, we need to get this right. Signed-off-by: David Woodhouse diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index cd219ef..d4d9f32 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); } /***********************************************************************/ -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation