From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 95F617CAF for ; Tue, 15 Mar 2016 02:17:23 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay3.corp.sgi.com (Postfix) with ESMTP id EAF46AC001 for ; Tue, 15 Mar 2016 00:17:22 -0700 (PDT) Received: from bombadil.infradead.org ([198.137.202.9]) by cuda.sgi.com with ESMTP id TzxwZrk6mLzItXoP (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 15 Mar 2016 00:17:21 -0700 (PDT) Date: Tue, 15 Mar 2016 00:17:07 -0700 From: Christoph Hellwig Subject: Re: [PATCH v18 21/22] ext4: Add richacl support Message-ID: <20160315071707.GF19747@infradead.org> References: <1456733847-17982-1-git-send-email-agruenba@redhat.com> <1456733847-17982-22-git-send-email-agruenba@redhat.com> <20160311142719.GG14808@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Andreas Gruenbacher Cc: "J. Bruce Fields" , Linux NFS Mailing List , Theodore Ts'o , linux-cifs@vger.kernel.org, Linux API , Trond Myklebust , LKML , XFS Developers , Christoph Hellwig , Andreas Dilger , Alexander Viro , linux-fsdevel , Jeff Layton , linux-ext4 , Anna Schumaker , "Aneesh Kumar K.V" On Mon, Mar 14, 2016 at 12:08:31AM +0100, Andreas Gruenbacher wrote: > The xattr representation is the same on disk and at the xattr syscall > layer, and so richacl_from_xattr is used for converting into the > in-memory representation in both cases. The error codes are not the > same when a user supplies an invalid value via setxattr or NFS and > when an invalid xattr is read from disk though. I'll add a parameter > to richacl_from_xattr to make this more explicit. Better add a wrapper instead of a parameter. > > >> +static int > >> +__ext4_set_richacl(handle_t *handle, struct inode *inode, struct richacl *acl) > >> +{ > >> + const int name_index = EXT4_XATTR_INDEX_RICHACL; > >> + umode_t mode = inode->i_mode; > >> + int retval, size; > >> + void *value; > >> + > >> + if (richacl_equiv_mode(acl, &mode) == 0) { > >> + inode->i_ctime = ext4_current_time(inode); > >> + inode->i_mode = mode; > >> + ext4_mark_inode_dirty(handle, inode); > >> + return __ext4_remove_richacl(handle, inode); > >> + } > > > > Should this check for a NULL acl instead of special casing that > > in ext4_set_richacl? > > I'm not sure I understand what you mean. When the ext4_set_richacl checks for a NULL acl pointer and then calls into __ext4_remove_richacl. I'd rather have that special casing in one place. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs