Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262511AbVAUVgu (ORCPT ); Fri, 21 Jan 2005 16:36:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262521AbVAUVgu (ORCPT ); Fri, 21 Jan 2005 16:36:50 -0500 Received: from mx1.redhat.com ([66.187.233.31]:17566 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S262511AbVAUVgb (ORCPT ); Fri, 21 Jan 2005 16:36:31 -0500 Subject: Re: Fix ea-in-inode default ACL creation From: "Stephen C. Tweedie" To: Andreas Gruenbacher Cc: Andrew Morton , Linus Torvalds , Andrew Tridgell , Andreas Dilger , Alex Tomas , linux-kernel , Stephen Tweedie In-Reply-To: <1106245344.15959.13.camel@winden.suse.de> References: <1106245344.15959.13.camel@winden.suse.de> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1106343376.1989.437.camel@sisko.sctweedie.blueyonder.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-9) Date: Fri, 21 Jan 2005 21:36:16 +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1271 Lines: 31 Hi, On Thu, 2005-01-20 at 18:22, Andreas Gruenbacher wrote: > When a new inode is created, ext3_new_inode sets the EXT3_STATE_NEW > flag, which tells ext3_do_update_inode to zero out the inode before > filling in the inode's data. When a file is created in a directory with > a default acl, the new inode inherits the directory's default acl; this > generates attributes. The attributes are created before > ext3_do_update_inode is called to write out the inode. In case of > in-inode attributes, the new inode's attributes are written, and then > zeroed out again by ext3_do_update_inode. Bad thing. > > Fix this by recognizing the EXT3_STATE_NEW case in > ext3_xattr_set_handle, and zeroing out the inode there already when > necessary. Ugh. It feels horrible to have to do this, but we _do_ want to clear the raw inode, and we only want to do it once, and we have to do it on first access to the on-disk structures. I can't see an easy way round it that doesn't add more overhead. Looks reasonable to me. --Stephen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/