From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751735AbeB0DlY (ORCPT ); Mon, 26 Feb 2018 22:41:24 -0500 Received: from mail-it0-f46.google.com ([209.85.214.46]:54394 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbeB0DlW (ORCPT ); Mon, 26 Feb 2018 22:41:22 -0500 X-Google-Smtp-Source: AG47ELu/MXt0yDOxqSLFDuzdjrh5Qgn9XsFmrC3adSLVrgz2XCBbe+gg0bOHHH3kmvuooNPOJOLXolu5v5jYQx2RMoE= MIME-Version: 1.0 In-Reply-To: <87tvu3qg2b.fsf@xmission.com> References: <87po4rz4ui.fsf_-_@xmission.com> <20180226235302.12708-3-ebiederm@xmission.com> <87r2p7rvn5.fsf@xmission.com> <87tvu3qg2b.fsf@xmission.com> From: Linus Torvalds Date: Mon, 26 Feb 2018 19:41:21 -0800 X-Google-Sender-Auth: 6VIjTj4Aaa-ITXFFYG9bnEBQUQw Message-ID: Subject: Re: [PATCH v7 3/7] fs/posix_acl: Document that get_acl respects ACL_DONT_CACHE To: "Eric W. Biederman" Cc: Miklos Szeredi , Linux Kernel Mailing List , Linux Containers , linux-fsdevel , Alban Crequy , Seth Forshee , Sargun Dhillon , Dongsu Park , "Serge E. Hallyn" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 26, 2018 at 7:14 PM, Eric W. Biederman wrote: > > As such I believe that usage of forget_cached_acl should be subsumed by > using ACL_NOT_CACHED. If not we should really come up with a different > helper function name to call from ->get_acl. Preferably one that does > "cmpxchng(p, sentinel, ACL_NOT_CACHED)" so that we remove the races. You make your bias very clear, by simply trying to hide the other case. But for chrissake, that's not the state right now. That other case exists. You can't - and shouldn't - try to just hide it. Besides, that "forget_cached_acl()" approach actually has a valid use case. Maybe you _do_ want to cache ACL's, but with a timeout or revalidation. ACL_DONT_CACHE really is a big hammer that makes caching not work at all. It's not necessarily the right thing to do at all. Linus