Received: by 10.223.185.116 with SMTP id b49csp4394019wrg; Mon, 26 Feb 2018 17:14:57 -0800 (PST) X-Google-Smtp-Source: AH8x225htGGskX3L3LQWdUBXGU8GS1NrjxMFxvDT75dcHQshL74ECevmV9SmaqJb/AWEfHO2yEjB X-Received: by 2002:a17:902:6116:: with SMTP id t22-v6mr12425873plj.307.1519694097655; Mon, 26 Feb 2018 17:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519694097; cv=none; d=google.com; s=arc-20160816; b=v7SPu+KmEaT7Mw52shTv6jpkKfK8X9hZZN4myU7ym/qLsiUZI60oLM+P/rhH+84vEX WZJ7jrRjVgXn/lnDyMMcvOGtA0v5sYwMVcmVmiH70lVe6/dKYRmhtHI2elC0tXQZQw4J XMKnF3ngyZoChtBTHpa/rhWCYNFs7EJUBSVY7aiyAUqa9IQntJpgwktZyf0PRUHTF+WF a76IDnvxWb6vrq3qu+bMStadZW6qq6sIc9HKXkLrD4Am+CXXLPtqrVCStezM6TOS06cB sDbhNJON+hZmtwFxOS3O6G+871eEA+QrY2Z72wM0DGsUNK3kHhQEGiZ5esMo39sK8lNA BLSg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=8DPAn0xt+h1xTnewmCEUmJd9RMVshcsJBBfk47zXSII=; b=BUAPtk+VDpt22+i9lRc3QjZlLRU9V1UMt87Sf8fq6qPsvkbOeECS9YP6PatDmZVuEH qW6cAlWatCT7fq+cyLpBIGBbkbJnhoblBic4EGU38p9wcqr179d7H9p42WVw48WRnjTz crbxdNvO3iW6xH6UOXi4GkK9EcWM9gY+UsA4LKRYHP+l2ExuonJPJ7cAc1X5LbmRneLX KmUkjNLchV7Bm33zehyZ54R/JeASeA1dRCHxus08USCicNU8tcbEfQj42ABPwrIdEhDh hLkQvFk3DJEbAfQaNnPQ9jpMcDJYEthOlLzR0WLoJMuWrn+vZcT8FcGFW/jNspKIHW4T j82Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VwT2XRCb; 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 y9si6232662pgv.776.2018.02.26.17.14.43; Mon, 26 Feb 2018 17:14:57 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=VwT2XRCb; 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 S1751661AbeB0BOD (ORCPT + 99 others); Mon, 26 Feb 2018 20:14:03 -0500 Received: from mail-io0-f173.google.com ([209.85.223.173]:39934 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbeB0BOA (ORCPT ); Mon, 26 Feb 2018 20:14:00 -0500 Received: by mail-io0-f173.google.com with SMTP id b34so19362906ioj.6; Mon, 26 Feb 2018 17:14:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8DPAn0xt+h1xTnewmCEUmJd9RMVshcsJBBfk47zXSII=; b=VwT2XRCbz39bkdeaXtoh+e3Ov3SGN5WlEq23SkeXgbcuVkfQMRv6/bBjCe8HvA/gAY LcQg/QnYDbpzehjRkPwmkDhRWXlLT1vIkqnzGOkUZVgFAdaKxluymeji1QNupWDisX7S SKN8YlY8nT0Dql4vGYGvxelyoI28mfzPr8JXPAhGUKV/gXJ3zYoZy9I2RG/siGe/+zvV 2yOhtZFHyNWvM9lZLZbCkeucjM4tPywTk2FYEOhJefgrmaiQDfvSrxc0Yya/989clJW4 uUXncwdG1tqE4BZpSNYPk4TaFVKLqd0GBUBS+MyG+KalVkuoyPM6ktBJ08qP1WgELXpH 2FhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8DPAn0xt+h1xTnewmCEUmJd9RMVshcsJBBfk47zXSII=; b=D0PVAbabGfho5KopSp9vQJ0k2LywMwiJ9uUXEI+QWGtxxZrFOI8D/1SHnu9EiMGlUp lfumdUUGG1rpsg+ly7VtAHjakJmJtcS2EmiwoW2vTMazgZs74ttPWCAnQHHGr8Hxlzqb LGbkHQHwHiEp18lzZGKpB9svP+Z//cT45cI1wOOYe/hyqh48zih3pcexxQuql0uqVIyA b90HStSr3THJkFsIVHEMYkUaH2wjZqRTJeNYYhiACLm4aJ+Nc8ery37KQ8lBa36hMEqM BKBYfLWj451+X6Iwquxnrp8fd+rGqlciuJPTkebRPGj7KYgcUizjnY4bJgyDncETCMsC z20g== X-Gm-Message-State: APf1xPBqvcyUsZgM7omQ1U3U08wiECeSH1O8dyTeXzTEG0vuyxqcBn7Y Um0a8BGo/Ey0prGBIfjManI0z9/2sHMKFZPfDcM= X-Received: by 10.107.82.1 with SMTP id g1mr14849583iob.203.1519694039693; Mon, 26 Feb 2018 17:13:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Mon, 26 Feb 2018 17:13:59 -0800 (PST) In-Reply-To: <20180226235302.12708-3-ebiederm@xmission.com> References: <87po4rz4ui.fsf_-_@xmission.com> <20180226235302.12708-3-ebiederm@xmission.com> From: Linus Torvalds Date: Mon, 26 Feb 2018 17:13:59 -0800 X-Google-Sender-Auth: u-_feA-tkg-0c-ZQyAtif2kqLrQ 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 26, 2018 at 3:52 PM, Eric W. Biederman wrote: > > Additionaly update the comment above the call to get_acl itself and > remove the wrong information that an implementation of get_acl can > prevent caching by calling forget_cached_acl. This part is just confusing. First off, that comment is correct: a filesystem _can_ prevent the returning of cached data by just calling forget_cached_acl(). Note that there are two different cases: saying that you _never_ want to cache things (ACL_DONT_CACHE) and saying that there _currently_ is no cached data (ACL_NOT_CACHED). forget_cached_acl() just removes the current cache. You're just replacing one case of "no cached" information with the other. Just explain the two cases, don't try to muddy the waters even more.. PLUS you are just confusing things entirely. That whole new comment of yours: + * ACL_DONT_CACHE is treated as another task updating the acl and + * remains set. is just garbage. The code is very clear - it will only replace a ACL_NOT_CACHED entry. The code is clear: if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) /* fall through */ ; this is basically just an atomic "if *p == ACL_NOT_CACHED then replace it with 'sentinel'". Your comment does not add any clarity at all, and only confuses things. It has nothing to do with "treated as another task updating the acl". The fact is, ACL_DONT_CACHE is treated as if the cache is simply already filled - it's just filled with "no cache". So the only thing special is ACL_NOT_CACHED, which is the only thing we will try to _replace_. So NAK on this patch entirely. It's just adding confusion, not adding clarifications. Linus