Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4664566ooa; Tue, 14 Aug 2018 08:55:40 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyUUVoREZkz7UzR2zmGIoZyUbxUOvgqECbDJQIItXAHihP8ILOeoaaNbfM0By5PuZsvkCoh X-Received: by 2002:a63:6d0a:: with SMTP id i10-v6mr21966266pgc.215.1534262140360; Tue, 14 Aug 2018 08:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534262140; cv=none; d=google.com; s=arc-20160816; b=pL3auvSUOcfekgFG1UjMrGQEBzJ9Xpi3im5wiZJmhHH/1jBy9AssQfx3laYrSWQ1VE hUTmWu33Fv6kUB6OYklsNbHVbG62OxYAZJAQtsYapbK0slyqCvFeOZKhM1/xwHyoxPTz mSwe91BB4VoT/WlKdAq3vbAFdGyKFsSTToCoFtKPmSUfh7Ari/3WW9Fc8hIZyMK0oV5O BCBNtwlXe4f20DKzwk/sYRX50BVzacfrjYYa83qQw+XwNd9uzkAWn3aDANIdXw8IdRYo cTxT9zUyDTuanEsDDmEJcsQcVuDWEtpwN+giBn6MDzxm6/OIRprEu4j7ii/ctiPQMb/H dMaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=yUv81+bqU2Q1ZT54GHqQFbDKsgTGDbHMvpx1HilywME=; b=cf+gknz7jGQAstN+g10gdsYHzU8JAAv8a6lgbcD0dFqHz0l42XdUhZVuHcnvGKwiwR A6RIF+UkLyqvvVNA+20SUKctRtCafWozsMDpSM9BLJ6bi/7gXPoVq1JRtDuL24LNvl6N J8+LgwsRMZNx9n9dHr1H0sffISCPS29v/aR8XcIjhnuE1Ojf9kjtcLqmUtPePelLMr7q 2PFoZqnjeYoaDStobbqRm25jOHU0+SNpRyEpuie/YjV54lDuUl4Fypq5RdIlV5Qd9xVs VapSXUwaWxnF4t7Cq5+MNhjrx+D4T+OZw6N/rkulFxq1kEtN0xsh/s8Mvn2BpfCglg9b udSg== 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 n19-v6si17265325pgd.408.2018.08.14.08.55.25; Tue, 14 Aug 2018 08:55:40 -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 S1732750AbeHNRFf (ORCPT + 99 others); Tue, 14 Aug 2018 13:05:35 -0400 Received: from mout.gmx.net ([212.227.17.22]:46955 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731724AbeHNRFf (ORCPT ); Tue, 14 Aug 2018 13:05:35 -0400 Received: from localhost.localdomain ([113.116.48.118]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MfRnb-1fVT7t3fWF-00P1wT; Tue, 14 Aug 2018 16:17:51 +0200 From: Chengguang Xu To: 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 Cc: 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, Chengguang Xu Subject: [PATCH 5/5] orangefs: cache NULL when both default_acl and acl are NULL Date: Tue, 14 Aug 2018 22:16:34 +0800 Message-Id: <20180814141634.5471-5-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180814141634.5471-1-cgxu519@gmx.com> References: <20180814141634.5471-1-cgxu519@gmx.com> X-Provags-ID: V03:K1:BhOPBB45She6oJeWlmpCdGqDSbI8TyNuOHvnSC5HNcIIncvOzG/ JTK+S7R8iPNvQAxBvwGITz58MAlbBUxOxh22HKn6nIZvHYBBLXIf8WwCot63jAWjh0XiWXc gRGiQ/OddweveN6gn2aA9+4VM7y715GaxPlvn0SeffSIuC4GAMR6zvrJHmaXvS/ui9UD4HU 7ou4lwyyzT2JwGEIiEsnw== X-UI-Out-Filterresults: notjunk:1;V01:K0:9P1WXlxYrBs=:i6ckKiby2rugs80mUEcnZy SJJIQRflKSCSOGi8vK539y6WXEHfLrBuncUMFm2OhStQV5mNaMlUXWtvWUFyvYTzgXwgUZ2Pk AWhoC4poFZlqGubtBHMC/n2pQqM3Fx2MlqpZ2kmMuFOsq4yCzAJMGnOm3UFL4TrTQvtLDp5tX inC+vo0V4mQ5AfX8Zhd/hf8mpP4mjfUull5BYLamUVgED5/7x1WsTlBX1QIT7tTCARx88LxBU ZAZ5AA0bRIfWfKT3oYRSktG0A9/jV8QbHcuj+rBVlP82ctvVlE80NJIKawAoVIJCDiLoXxVm/ I1WhbPCkyXb1air/8A7i8o3ieRL03vW2j+fII55HOLDMv3x+d1ewE74OSmxSZ+XRUAYoPlDZi GyiOLugl3OtWrPOSgZywXi7rrLKdQCotBWaY0yaxIvAQOHa23zkh9Y3hCld7gu8u4xl2/bvmX nkG+l2zh5/TuZZaubuEbI5tedmLprcmTMIszotTf59VsaIax6uTE7IaXxRIatXtWGjESQXD9C 8SZUAmzOSmmEGGkv849f4/hUvXuWX4lc8SE0PrYx3GwuTZKewSZk3+TwSHvB8DnyRewF/wPGa Y/JkEfVu9UVyBsg7LpU+yzKQnnzPP3tUdyR+u53h0H2p7lY+zzEYXdWN+Myx6zyAcTqEQX09H rSWVJrwGlzwDEGbbpNCcjehThX3KgLWD9qbX3s82cvAf+WwMlKi5QgvfTceypou270VPSAxri M68CxdYijMVB5rUWItEPsoct9cFSJfdbDA9JFoNhW/X5QJv7EfJ6wm9GbzQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/orangefs/acl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c index 10587413b20e..e3b043a263bc 100644 --- a/fs/orangefs/acl.c +++ b/fs/orangefs/acl.c @@ -175,6 +175,9 @@ int orangefs_init_acl(struct inode *inode, struct inode *dir) posix_acl_release(acl); } + if (!default_acl && !acl) + cache_no_acl(inode); + /* If mode of the inode was changed, then do a forcible ->setattr */ if (mode != inode->i_mode) { memset(&iattr, 0, sizeof iattr); -- 2.17.1