From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: vfs-scale, nd->inode after __do_follow_link() Date: Fri, 14 Jan 2011 15:09:10 +1100 Message-ID: References: <7352.1294971049@jrobl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel , linux-kernel@vger.kernel.org To: "J. R. Okajima" Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:55503 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959Ab1ANEJM convert rfc822-to-8bit (ORCPT ); Thu, 13 Jan 2011 23:09:12 -0500 In-Reply-To: <7352.1294971049@jrobl> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jan 14, 2011 at 1:10 PM, J. R. Okajima = wrote: > > Isn't it path.dentry->d_inode instead of nd.inode? > > J. R. Okajima > > diff --git a/fs/namei.c b/fs/namei.c > index 5bb7588..1df3bee 100644 > --- a/fs/namei.c > +++ b/fs/namei.c > @@ -2356,8 +2374,9 @@ reval: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto exit_dput; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0error =3D __do_follow_link(&path, &nd,= &cookie); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (unlikely(error)) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!IS_ERR(cookie) && = nd.inode->i_op->put_link) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nd.inod= e->i_op->put_link(path.dentry, &nd, cookie); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct dentry *i =3D pa= th.dentry->d_inode; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!IS_ERR(cookie) && = i->i_op->put_link) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i->i_op= ->put_link(path.dentry, &nd, cookie); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* nd.path had been dr= opped */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nd.path =3D path; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_path; It should be the inode we followed, rather than the inode of the new path, I think. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html