Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2130472imm; Fri, 7 Sep 2018 11:14:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYmj9kTvwRiusktq6DbOtMa4uTLNzLZKibEb14jPY1nTkZbqNpaIDYxPHcT+hV+cJmQaAaJ X-Received: by 2002:a62:1605:: with SMTP id 5-v6mr9941632pfw.11.1536344071043; Fri, 07 Sep 2018 11:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536344071; cv=none; d=google.com; s=arc-20160816; b=t95WfFl7EL45IqtsYvNfidTrZj5UqLFbkYmp2CwXQQq2szgFexgbVnKTm+LC7+/256 JIc2VVtAuUoxWN3wzIOIYIvUcCxEFG8IBfONMcwQj3nvew0lX9542z7rZyTY4b3CSJG3 x5NH4lUMeapoitr/9qm37E2fZWsBLr9KRmi+Cz4eAuXEe8umdrMS3SOk7GcQ1InvCEIQ rnQAfNwXVQNgf2CVBApjgkXWT5gOhptyUwFNljp7sEl3cZ9j1WQI8zEPiGJnKVBVmu4h RmdZq5SHQUc9xMcJ66dGmsGzlpBKRonIsGM6RLU+TiLEy9hQ5s2RlIjNMgqfBpAcncyO KSqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cbtc8TzdCugj3QHIJWgj2/BTkMLKbdDPgbrqfwSUAro=; b=L2d8ldpeI6xB05H0KHIe94m7sZfrKa29OKjC5vxgBoEnKVSnDmpwx8PavHlxLi+KE9 SFuG4zHf50uSkCZu0QlRg4N+7FjiugYXo3a1TYLP/1IM28fPFEJ14siDLo5YUO/TsHrV FrMqd/Rtq8v2Oq8IdZuQ+muga53iEmjbTTLGPn8LxBhqFfLTciOcFByqTNVEYS6B8x08 4ROkeehr6yMcECT/Sz4jQwDiYCzQdURCdTDvdgiYUrfCMtEjHObCeHf2VPAyHfb1BuBt Pq0Yl0+rWo2HM6dhqpi9LtRpS8Y6aHh3MDjPs4KnNPv5FK2b9Z39PaDS1Rg24rAbDBf+ 7GlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=bqXJ3Ecw; 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 j64-v6si9371049pgc.88.2018.09.07.11.14.15; Fri, 07 Sep 2018 11:14:31 -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; dkim=pass header.i=@omnibond-com.20150623.gappssmtp.com header.s=20150623 header.b=bqXJ3Ecw; 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 S1727677AbeIGWx0 (ORCPT + 99 others); Fri, 7 Sep 2018 18:53:26 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:36246 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbeIGWx0 (ORCPT ); Fri, 7 Sep 2018 18:53:26 -0400 Received: by mail-yb1-f194.google.com with SMTP id d34-v6so5779422yba.3 for ; Fri, 07 Sep 2018 11:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cbtc8TzdCugj3QHIJWgj2/BTkMLKbdDPgbrqfwSUAro=; b=bqXJ3EcwD5lcE8Idzuoxc5igQiygGxI4Z3Y3OPODdxu2bL+i3j7zwgNIBRLVUoNB6I lY14YIRm6espk0/f8EIVL/5JE6B+AC5E7E2zVB6y1+MaF3NmrK0frbU1CM6am0K+UQOL lYg/SqfPUQQlJvvSUn7xJbAtg2UwzEtB0mH5jF88mHQgy+iTkdWCWSfpcrK42M9PhjqD JLC1aB7Adcfd4eS/l3MSwKwgozJCz8O6/78WFmrNpbDCtcQ2mHXGgoIKpENa/8yGOkpQ 68AQHAOjB1Y5UeSMrvv2SrIvU3O/8xNGNGnpsnuN1ncZRO6Tgfc6Gnc/UM5tOlbyUDDD /ZkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cbtc8TzdCugj3QHIJWgj2/BTkMLKbdDPgbrqfwSUAro=; b=ENPyzGt+bdlfTqGBcPVHmsLL585K7kxwfl38fS7ozJ7P8QIt5kjYVeL8az1oLSsizI ulXLEHHoVO7uVbuZBzYMK8zq9j6A+RaBLIeh20BEzwJp3vQVz7LAIPornPdBTCSQHvAf RH0Oufg7XHb8AdEmqSNXv/qNnJZZk155Hn7/UZfzWFkQPUc3dHVnsD7GYK85q3zxrI0U iVzpN9YF0tNyj1juprGPIqYYiNfylMIhZCqdLtD1+awcm59AKgJ6FQ9L4+NOh21cCSNe NxwIuaQveQSAnZC75kyi8fj5myePHnsjR7H50hPN4hngOcuJYVa12QvBCTzhk8SQIXyg eB9A== X-Gm-Message-State: APzg51AxPUT5TRvlEsrw7zLDMWlxhnDm1IHbmdA0dnSdrDdNEstPhM1R l+fEYdL0zZpd6mBKgn8ejzSYYtovTuZ8jPJeyUhbgA== X-Received: by 2002:a25:be04:: with SMTP id h4-v6mr4672158ybk.407.1536343879362; Fri, 07 Sep 2018 11:11:19 -0700 (PDT) MIME-Version: 1.0 References: <20180831143352.22970-1-cgxu519@gmx.com> <20180831143352.22970-5-cgxu519@gmx.com> In-Reply-To: <20180831143352.22970-5-cgxu519@gmx.com> From: Mike Marshall Date: Fri, 7 Sep 2018 14:11:08 -0400 Message-ID: Subject: Re: [PATCH v2 5/5] orangefs: cache NULL when both default_acl and acl are NULL To: cgxu519@gmx.com Cc: jack@suse.com, "Theodore Ts'o" , adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, shaggy@kernel.org, Martin Brandenburg , devel@lists.orangefs.org, LKML , Ext4 Developers List , linux-f2fs-devel@lists.sourceforge.net, jfs-discussion@lists.sourceforge.net, Mike Marshall Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks... I've added your patch to 4.19-rc2, run it through xfstests, and added it to my linux-next tree... -Mike On Fri, Aug 31, 2018 at 10:35 AM 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 > --- > v1->v2: > - Coding style change. > > fs/orangefs/acl.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c > index 10587413b20e..72d2ff17d27b 100644 > --- a/fs/orangefs/acl.c > +++ b/fs/orangefs/acl.c > @@ -167,12 +167,16 @@ int orangefs_init_acl(struct inode *inode, struct inode *dir) > error = __orangefs_set_acl(inode, default_acl, > ACL_TYPE_DEFAULT); > posix_acl_release(default_acl); > + } else { > + inode->i_default_acl = NULL; > } > > if (acl) { > if (!error) > error = __orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS); > posix_acl_release(acl); > + } else { > + inode->i_acl = NULL; > } > > /* If mode of the inode was changed, then do a forcible ->setattr */ > -- > 2.17.1 >