[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiiYSSpmgLRaq+AXg5NjCh_02ShSXRxsa8CfoKa0OooEQ@mail.gmail.com>
Date: Thu, 2 Sep 2021 09:35:24 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Miklos Szeredi <miklos@...redi.hu>,
Al Viro <viro@...iv.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-unionfs@...r.kernel.org
Subject: Re: [GIT PULL] overlayfs update for 5.15
On Thu, Sep 2, 2021 at 6:51 AM Miklos Szeredi <miklos@...redi.hu> wrote:
>
> The reason this touches so many files is that the ->get_acl() method now
> gets a "bool rcu" argument. The ->get_acl() API was updated based on
> comments from Al and Linus:
>
> https://lore.kernel.org/linux-fsdevel/CAJfpeguQxpd6Wgc0Jd3ks77zcsAv_bn0q17L3VNnnmPKu11t8A@mail.gmail.com/
That link might have been good in the individual commit message too,
but I did it in the merge commit instead.
I did notice that we now have a stale comment about ->get_acl() in fs/namei.c:
acl = get_cached_acl_rcu(inode, ACL_TYPE_ACCESS);
if (!acl)
return -EAGAIN;
/* no ->get_acl() calls in RCU mode... */
if (is_uncached_acl(acl))
return -ECHILD;
but we actually did the RCU-mode ->get_acl() call already in
get_cached_acl_rcu().
Of course, get_cached_acl_rcu() only does it for ACL_DONT_CACHE, not
for ACL_NOT_CACHED, so RCU mode is still a bit special.
At some point we probably should make get_cached_acl_rcu() do the
right thing for a successful lookup with ACL_NOT_CACHED set too, and
actually install the newly looked-up ACL. But I haven't thought much
about locking (but I think it would be ok, we use "cmpxchg" to update
the cached entry).
This is just a "maybe fixme for the future" note about that comment
and about get_cached_acl_rcu() behavior. I've pulled this, and I think
we're ok, it's just a small oddity.
Linus
Powered by blists - more mailing lists