[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAASaF6yT=YbDfnwczWSEiEkn+evkWCPF0_MmO3OKCEmuFOG32w@mail.gmail.com>
Date: Fri, 11 Apr 2025 16:20:27 +0200
From: Jan Stancek <jstancek@...hat.com>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk, jack@...e.cz,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: use namespace_{lock,unlock} in dissolve_on_fput()
On Fri, Apr 11, 2025 at 4:09 PM Christian Brauner <brauner@...nel.org> wrote:
>
> On Thu, Apr 10, 2025 at 05:05:42PM +0200, Jan Stancek wrote:
> > In commit b73ec10a4587 ("fs: add fastpath for dissolve_on_fput()"),
> > the namespace_{lock,unlock} has been replaced with scoped_guard
> > using the namespace_sem. This however now also skips processing of
> > 'unmounted' list in namespace_unlock(), and mount is not (immediately)
> > cleaned up.
>
> Thank you for spotting and fixing this! My bad.
>
> > diff --git a/fs/namespace.c b/fs/namespace.c
> > index 14935a0500a2..ee1fdb3baee0 100644
> > --- a/fs/namespace.c
> > +++ b/fs/namespace.c
> > @@ -1830,6 +1830,8 @@ static inline void namespace_lock(void)
> > down_write(&namespace_sem);
> > }
> >
> > +DEFINE_GUARD(namespace_locked, struct rw_semaphore *, namespace_lock(), namespace_unlock())
>
> I'll call that namespace_lock instead if you don't mind.
I don't mind - I used "locked" because it's easier to grep for, when
it has distinct name.
Regards,
Jan
Powered by blists - more mailing lists