Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4539887ooa; Tue, 14 Aug 2018 07:19:34 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyT/+iS2czPym28AwmOlvXgHGB/5L70zpfY9gf1ITFUoo/k1OBt8Pl9EeqC6UpZ0T7ekld+ X-Received: by 2002:a65:630e:: with SMTP id g14-v6mr21452830pgv.153.1534256373926; Tue, 14 Aug 2018 07:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534256373; cv=none; d=google.com; s=arc-20160816; b=0HSz1EqBhNGlV9rxM9pc6fPg+BXjLHDNyyv5433+eRYQ/scuMGk8zm4IgXz6GGvlxP vrCMjfUVcM83W0a5DayD3gCc+Yb3aT77rysGUGREejSBIcFYafZNZY718NO/nGWMRIgF Vnddsw4SzFcP6FKwpqJsguBJ7ofYmfgTV5igo6A2Y5NvD7nys7CpABcBKnb4cdpGmrQU zkVTCvX8vIDQMjnms9wWRPphXeL9j1wKOFSbfczY6ktwr7ltTU2ewTwh/lTLFXvhnrtM U3FT9ogNACBDEXhk3VaRqo+q3cLQbgPNEh8aIAMwVQ6sspagiR9O5n1jtf4I4j+hA0TQ +C/w== 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=l+yfEy0SrPCYiptfFtr+jzYtdwQ4oZ+M6enUn3hFbQQ=; b=r/YIflBkHppyjbhE2xyqUeQXgQHGZfqMJQ7Y/Js4LT7GnvmhmFDIeiPJZIGsC8B6O0 Pyg47SaW3/Cbnlo8KYh9a4fkHIrX93XX1i1YqNMe2NIjFYMXlGrXgIcSe+5KwbgdJghv sxQUuAVtzU5I3vrI2TMJ/8gxOlG9Cy1G5EFKn1g/c9zLlAQpHQJrFVebfQqOBm1lvfLv TfPcw07xU4A3H15odoqbVW4sIsjL9/e3WOkOmWPhKGJyoWjcbGPImWgUTB1c25UGtZd6 Q9tD5gFlx2rLDOlRGeM3WKd+FVy1rKvTA3a3CriPjlryzTvk/UGj8duUuA/oPCwYeion PQ+A== 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 b4-v6si3112827plb.215.2018.08.14.07.19.17; Tue, 14 Aug 2018 07:19:33 -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 S1732721AbeHNRF2 (ORCPT + 99 others); Tue, 14 Aug 2018 13:05:28 -0400 Received: from mout.gmx.net ([212.227.17.21]:50249 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731724AbeHNRF1 (ORCPT ); Tue, 14 Aug 2018 13:05:27 -0400 Received: from localhost.localdomain ([113.116.48.118]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MOBOi-1fmIMG0eQe-005Zmc; Tue, 14 Aug 2018 16:17:45 +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 4/5] jfs: cache NULL when both default_acl and acl are NULL Date: Tue, 14 Aug 2018 22:16:33 +0800 Message-Id: <20180814141634.5471-4-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:rFT9OJLTD5YX3u8WgsumqfTElBTL6IWEdsGpYGKSnCTaTeUn12d 2VaHQwFRFSx0wGaCnH5vm644dlg+v74VbC4sZFjl42WETQzFiHgh4RkUd45rmAaefsvCcxs hvcnsyEERyv99M17p+5dJ0LudNhlYufLx//z5McIVz9sfK6fKwwVczDbtSyLz1pM2VirWR7 FD8QkJ17EgZtE7KTlvEQg== X-UI-Out-Filterresults: notjunk:1;V01:K0:faAfP3zc69I=:toXgGeQGVhQ8uFI51XScnF P8QQwv5vuTmeif+RMp2MiyL3CIgYQjQAZ2owBfZ0qxZGku8Z7oR+w//4YB/Zh2XzRys60FWPW zKh3a+LBoE2GFOP8TG1t9fGIVd6BekuwNUQODFjm1eTqQU7izxN2slTpT3VKCablmreOQ/Hoz fuNw0y0m5/lbpKMZo457fSFNBUheNft9ZhRqRIFB6E0fvAezH88/Y7DhvjB/WqXmpaMg2AhnJ /EkztpU0WDiXD9ImJQP6sndEs+q4IqsrEq9YGLSggahsG2md7QuB9g+gDY66MFHucLJUfBRSs XN+2AMMRK/mhW7gAJFFG6wd/QO/8FM7VttYnSs3A/0xPeg8/jz9zM7h4sWUeiPr1kTyuE0zfk 4Dbs+dN8BOHz5r9pq6HNhLq1yDkq0PfhpXi37aA8yfjpf9tej0xGtxfj9ugmPNdbCWH0D8KWc QToOAGJDzUzpAq+L2IIRw8wr1m3eFEkqkRHQ+/0k6Xu1JWto28EkOiv85dDdccHFT181bYHZm wDrB3Z5vDeF3ZY4PWKfSyhccgVHURuh3IPoLcN9XapttsK8gBmFh3pI1o2DROIKAE/z4a4eYD QkVKQdpqrlmvd2My6nvX83zNa/T/aK3Jmcl777RNrmx2I/qNerqB0CM+V6rc9qaVlHKhDUa0r q1cHnxVzzQd2NbCUBxUIqLV+2X2vW1+EdbtpA3GTS1fIEqztwQBAbTANa1VXwLh48DGf3nKkg NEA3DBzJF6Ll1f47ENfOppRhFglWvq+iBSw2vK6K60dKdWy0BjBq253dlbw= 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/jfs/acl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 2e71b6e7e646..15b9a9b74d72 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c @@ -154,6 +154,9 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir) posix_acl_release(acl); } + if (!default_acl && !acl) + cache_no_acl(inode); + JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) | inode->i_mode; -- 2.17.1