From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [git pull] vfs pile 1 Date: Thu, 30 Jan 2014 14:07:09 +0100 Message-ID: <20140130130709.GA21704@lst.de> References: <20140127142520.GD10323@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , Jan Kara , Christoph Hellwig , Linux Kernel Mailing List , linux-fsdevel To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Jan 28, 2014 at 07:26:08PM -0800, Linus Torvalds wrote: > but the mode we're changing to (and what ATTR_MODE guards) is actually > attr->ia_mode, not inode->i_mode. And quite frankly, passing in > inode->i_mode looks stupid, since we're already passing in the inode > pointer, so that's just redundant and pointless information. At this point inode->i_mode has been updated to attra->ia_mode. Passing in the mode allows fileystems to defer the i_mode update until after the ACL has been modified, which at this point only f2fs does. In a perfect world filesystems do both under the same lock for in-core access and in an transaction for the on-disk change, in which case the exact order doesn't matter.