Re: [PATCH 09/52] put_mnt_ns(): use guards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 25, 2025 at 05:43:12AM +0100, Al Viro wrote:
> clean fit; guards can't be weaker due to umount_tree() call.
> Setting emptied_ns requires namespace_excl, but not anything
> mount_lock-related.
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---
>  fs/namespace.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 898a6b7307e4..86a86be2b0ef 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -6153,12 +6153,10 @@ void put_mnt_ns(struct mnt_namespace *ns)
>  {
>  	if (!refcount_dec_and_test(&ns->ns.count))
>  		return;
> -	namespace_lock();
> +	guard(namespace_excl)();
>  	emptied_ns = ns;

Another thing, did I miss

commit aab771f34e63ef89e195b63d121abcb55eebfde6
Author:     Al Viro <viro@xxxxxxxxxxxxxxxxxx>
AuthorDate: Wed Jun 18 18:23:41 2025 -0400
Commit:     Al Viro <viro@xxxxxxxxxxxxxxxxxx>
CommitDate: Sun Jun 29 19:03:46 2025 -0400

    take freeing of emptied mnt_namespace to namespace_unlock()

on the list somehow? I just saw that "emptied_ns" thing for the first
time and was very confused where that came from. I don't see any lore
link attached to the commit message.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux