Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4539560ooa; Tue, 14 Aug 2018 07:19:18 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxDDJLS8ueBYH47T0IuY4k7ROeG4gkwlTfeFjpoyBBPuQ1r9R9+Xn5LCZaZ5JWGxIwsq6qP X-Received: by 2002:a17:902:7b83:: with SMTP id w3-v6mr20437096pll.192.1534256358472; Tue, 14 Aug 2018 07:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534256358; cv=none; d=google.com; s=arc-20160816; b=BNb/lTNrEJsD51abDGgUwwaAilAL2oCQEmepBPct8JEztJNu6k45JIjueV+mbJOkee K97OjuysbF0uUwirWIeEIZpzwntIkS73SUhf7CZ/+OsSuwAFmPx7RzpGfqL3f8kGGCc5 Q/8MJ5DMg++6x8aVJQc3lWykHQJ+NALLzFLar+oj7fowjJuzANB2JGhuTQNKNXXmxSMl WpHOXdqyTrVhL8FaJgh5t3MtNezBsFxzX61HUVUqlRFfSM/14AL1sL564vajs52iGR5x E2b0d6IKvX7F2k5WWDIc2cp+VkDY4+zECGqkC/n6c8If4tdSPTKCt4yrQO720aQ1K+8+ A6Fw== 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=04LBKFs2nUosxR01W/n4RrMdSLjDaugL8di5KVb1Shw=; b=NbS4mBO3Ml+6dFbf+C+FA00fxauozabF5SLxEqqPB3qd8DHmoo6r6+eON5PuGjzz2F h66dM1MyvGLQLmWVS1jb4LJK9vwitC5qv8ekNxfm7qjo+/QzKuxryZkx3ICtlFG9bRoF JKejtCz0Fre8IymdHL1hr0IlnzbeuHsQKBdUDfz8UsM9cLTpAIk8kS0TMsdc/uY9aS2A yp1aZxL49c/n7UBgKCsYm5ruHDaLiplxNKVAhU2/VRlThI1wYeMwhZQ6C68G96QOjv17 kDYouu0htHHk70Fu7X2gEHCU8m8wUUiz6wMNd+isvcsSPkcWlNkOpLgCfz9VE4iCMwpe xxIQ== 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 3-v6si21134298pgm.37.2018.08.14.07.19.02; Tue, 14 Aug 2018 07:19:18 -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 S1732620AbeHNRFR (ORCPT + 99 others); Tue, 14 Aug 2018 13:05:17 -0400 Received: from mout.gmx.net ([212.227.17.20]:39377 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731724AbeHNRFQ (ORCPT ); Tue, 14 Aug 2018 13:05:16 -0400 Received: from localhost.localdomain ([113.116.48.118]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0Lusmr-1fyPuM0H2X-0104eF; Tue, 14 Aug 2018 16:17:31 +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 2/5] ext4: cache NULL when both default_acl and acl are NULL Date: Tue, 14 Aug 2018 22:16:31 +0800 Message-Id: <20180814141634.5471-2-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:D0Oo4rCzcfWw6KdCUnd/Ln/zsvTraDWmZ8Mjca/sLBVdS0MqNBj 427NIlgz1sCovxz+/OeqLZxwjzN8DJwU8iXWiJLl48YNFPG1BBXw6ISv0WUpGgNUPr+4hGO nwXLTJtDdbpoF0uXgR7FzUGoRWcLMRXaGM5+RsynsZAZr8r9WoujeQQ4YqV1XtJwKAgjTnR rjGr8VNgK5JtFfvtAEQyA== X-UI-Out-Filterresults: notjunk:1;V01:K0:NHkn60ZSxK0=:gh2j5YGnuwU/n75flX5GfJ F7juCxsVuy/CiTT+tKX+g83BcpfVm7uBCthHbF29KXNq1d+o6tC/RRpIf6mzMIudumEzb7Zde QJsNDTsjMtI0ij9R67wGTz6bIOULbkoVWoLgL+cCBNQxtNsWjeD0Onr0O6aY+Ss/2+MWAZTjd gHhZrd0h37mMTNIsNt1Zqk7yi0bQxjWF2uaoS+ZDYoWk9Ppp04V4kZNubbqrGiAQUfVuNjbKJ we6PXbMQG0De2N7W6Cmqp8QhQtAWRVXtv5ORJY1tjldI0PPKKkdk6xsdUDfm0NsqenqYHDOg2 Vp9oNIcsEWhzAzVIVxptHvOGJWZnmWP8xb1d3mKwEG20GFm/q3cGbCE09QDPtckEWSokgXnrb p9kanj8H3WEERAAzJ9ZCMMMAsT/SrvhWPyXa5UkogDmIysQd2K1x3B87dp/0c66LFakbqzioL ZzebSHln64CkYCQqgMxvEH+JmB2Z1JYeaiQK9muyppru5vHiG37u51/INzCMgrsoMTT64AO5T 5DlHUG5FAM5v5eWzyTbbewXUKhlCMV459qry/Efb66/ECZSE2lFhIPSb4glV0lDHLrOyKNOB5 ZEZvkjs5i3Inwo1tLFJpjgkB2kbZQp7CdKLkO8UreBAuLe55EmGInPTu/jdc4xwlGVaLJgHLg qCoTbL446Q8KtZjG/Q0tYLcYuS3AO5NEPFQPSlc8itiCgtaidMShCyGVcgMWm0++HpB2efkjc gosulZe5t7ZN07LkPpJ40xw+GYKfKBjqWfI1H7qb9eRGjIjlcxz4ULTNktY= 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/ext4/acl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index fb50f9aa6ead..69a01d28356d 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c @@ -291,5 +291,8 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir) acl, XATTR_CREATE); posix_acl_release(acl); } + if (!default_acl && !acl) + cache_no_acl(inode); + return error; } -- 2.17.1