Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1503024imm; Mon, 3 Sep 2018 02:05:16 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYkIFTud4ktHt0K75eIrQ/dIOFYbNV2yu65F+lIICQ7MKmYJzq+PEUyqjXp25rI5EbO0EFL X-Received: by 2002:a65:48c6:: with SMTP id o6-v6mr24635241pgs.99.1535965516786; Mon, 03 Sep 2018 02:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535965516; cv=none; d=google.com; s=arc-20160816; b=MlTBk2mFv33rzUsmCd1HKsxGyCr6MMn96d2a8VIcwfXmgn7QmoIrxp4HD0Ew4YC45B fKd2hb8sj72FUCzp4QD/2fXs4/yVWKv7yvVMxAeR7iSZQr2o5XS816r47PVtD8wfOqvM 3q6F7s9TB9BOa48u+aXr3qf60k4q2obZBZbsfO/IpXBXaad9pvetmxcOKBWUNc1AHIa1 zq3br1D6ldRw2WRq7f2n+UH+BLnxnjeTOSOkT18qpcV7ZOzCoiEHKqXcEOLVDcBueeS9 7+VvKLMTABq40LxzP7AiFPFZ83XclZ80kt2UvN2+FUBt1z4X6/gcLZ2hYcbNTuoG+KcQ 60rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TEeHxZ6xAgTNFlcnzwZp1cu+Yk5R3QRO01bMu6EYUzY=; b=QXwk5tUn8rosXZRhRdBZQopnQ0nNekGR8Y6Sgqhom+ei5kEdxAdp9y180OFCWUg3C5 Of8Y0sMlo89OPmXHcw4bLGh8sSPQiDOAS9qvE+m2UEofOSd69K3xNeHHmW5/DjD22270 D16tkBboSdrrs2pdb8L03/pdRt4RHEr+BvXgPTcXrKRBZ9CAdH6LzaTQjjNOO/sovAL2 HUwL6wSqFwOqcC8Q9+xVB4YYTzc1oD1xc4NdQstebzm3sTxKJigSZI+iiG6PDDFCPFNQ R053fu5DBuvhy3syG9/R6xd59ZlzassIkUuGgpqamRy8xgzLKyZRz28s3fhOQMz/i7YN 8nhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7-v6si19353927plk.122.2018.09.03.02.05.01; Mon, 03 Sep 2018 02:05:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727487AbeICNWq (ORCPT + 99 others); Mon, 3 Sep 2018 09:22:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:51854 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726212AbeICNWq (ORCPT ); Mon, 3 Sep 2018 09:22:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 18FC1AF02; Mon, 3 Sep 2018 09:03:33 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 39DD11E3609; Mon, 3 Sep 2018 11:03:32 +0200 (CEST) Date: Mon, 3 Sep 2018 11:03:32 +0200 From: Jan Kara To: Chengguang Xu Cc: jack@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, shaggy@kernel.org, hubcap@omnibond.com, martin@omnibond.com, devel@lists.orangefs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, jfs-discussion@lists.sourceforge.net Subject: Re: [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL Message-ID: <20180903090332.GE10027@quack2.suse.cz> References: <20180831143352.22970-1-cgxu519@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831143352.22970-1-cgxu519@gmx.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 31-08-18 22:33:48, Chengguang Xu wrote: > default_acl and acl of newly created inode will be initiated > as ACL_NOT_CACHED in vfs function inode_init_always() and later > will be updated by calling xxx_init_acl() in specific filesystems. > Howerver, when default_acl and acl are NULL then they keep the value > of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl > in this case. > > Signed-off-by: Chengguang Xu Thanks! I'll take this patch (with slight changelog update) to my tree. Honza > --- > v1->v2: > - Coding style change. > > fs/ext2/acl.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c > index 224c04abb2e5..cf4c77f8dd08 100644 > --- a/fs/ext2/acl.c > +++ b/fs/ext2/acl.c > @@ -256,11 +256,15 @@ ext2_init_acl(struct inode *inode, struct inode *dir) > if (default_acl) { > error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); > posix_acl_release(default_acl); > + } else { > + inode->i_default_acl = NULL; > } > if (acl) { > if (!error) > error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS); > posix_acl_release(acl); > + } else { > + inode->i_acl = NULL; > } > return error; > } > -- > 2.17.1 > > -- Jan Kara SUSE Labs, CR