The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Jan Stancek <jstancek@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	jack@suse.cz,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: use namespace_{lock,unlock} in dissolve_on_fput()
Date: Fri, 11 Apr 2025 16:08:13 +0200	[thread overview]
Message-ID: <20250411-umlegen-herauf-508fe182fffa@brauner> (raw)
In-Reply-To: <cad2f042b886bf0ced3d8e3aff120ec5e0125d61.1744297468.git.jstancek@redhat.com>

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.

  reply	other threads:[~2025-04-11 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 15:05 [PATCH] fs: use namespace_{lock,unlock} in dissolve_on_fput() Jan Stancek
2025-04-11 14:08 ` Christian Brauner [this message]
2025-04-11 14:20   ` Jan Stancek
2025-04-11 14:08 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250411-umlegen-herauf-508fe182fffa@brauner \
    --to=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox