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>