From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: remove inode_setattr Date: Tue, 10 Aug 2010 17:59:44 -0700 Message-ID: <20100810175944.5919319e.akpm@linux-foundation.org> References: <201008101859.o7AIx9BM026915@hera.kernel.org> <20100810155011.b9657102.akpm@linux-foundation.org> <20100811101751.1afdded8.sfr@canb.auug.org.au> <20100811104503.4082f68f.sfr@canb.auug.org.au> <20100811005216.GB31363@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:57005 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370Ab0HKBAB (ORCPT ); Tue, 10 Aug 2010 21:00:01 -0400 In-Reply-To: <20100811005216.GB31363@ZenIV.linux.org.uk> Sender: linux-next-owner@vger.kernel.org List-ID: To: Al Viro Cc: Stephen Rothwell , Christoph Hellwig , Linus Torvalds , Eric Van Hensbergen , Sripathi Kodi , LKML , linux-next@vger.kernel.org On Wed, 11 Aug 2010 01:52:16 +0100 Al Viro wrote: > Whiskey Tango Fotrot, Over > > In Linus' tree we have > commit 1025774ce411f2bd4b059ad7b53f0003569b74fa > Author: Christoph Hellwig > Date: Fri Jun 4 11:30:02 2010 +0200 > ... > diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c > index 4331b3b..4b3ad6a 100644 > --- a/fs/9p/vfs_inode.c > +++ b/fs/9p/vfs_inode.c > @@ -896,10 +896,19 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct > } > > retval = p9_client_wstat(fid, &wstat); > - if (retval >= 0) > - retval = inode_setattr(dentry->d_inode, iattr); > + if (retval < 0) > + return retval; > + > + if ((iattr->ia_valid & ATTR_SIZE) && > + iattr->ia_size != i_size_read(dentry->d_inode)) { > + retval = vmtruncate(dentry->d_inode, iattr->ia_size); > + if (retval) > + return retval; > + } > > So what the hell is going on? That's v9fs_vfs_setattr(). The problem is in the new v9fs_vfs_setattr_dotl().