Re: [PATCH 01/52] fs/namespace.c: fix the namespace_sem guard mess

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

 



On Mon, Aug 25, 2025 at 05:43:04AM +0100, Al Viro wrote:
> If anything, namespace_lock should be DEFINE_LOCK_GUARD_0, not DEFINE_GUARD.
> That way we
> 	* do not need to feed it a bogus argument
> 	* do not get gcc trying to compare an address of static in
> file variable with -4097 - and, if we are unlucky, trying to keep
> it in a register, with spills and all such.
> 
> The same problems apply to grabbing namespace_sem shared.
> 
> Rename it to namespace_excl, add namespace_shared, convert the existing users:
> 
>     guard(namespace_lock, &namespace_sem) => guard(namespace_excl)()
>     guard(rwsem_read, &namespace_sem) => guard(namespace_shared)()
>     scoped_guard(namespace_lock, &namespace_sem) => scoped_guard(namespace_excl)
>     scoped_guard(rwsem_read, &namespace_sem) => scoped_guard(namespace_shared)
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>




[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