]> Gentwo Git Trees - linux/.git/commit
WRITE_HOLD machinery: no need for to bump mount_lock seqcount
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Aug 2025 18:04:31 +0000 (14:04 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Sep 2025 19:58:29 +0000 (15:58 -0400)
commit1e414adf03ae5a9928aad9044a07adeb92ddcd2c
tree8bbfebf7f3866fa8dcc11e9920bd57bab1259131
parent3371fa2f27134fc4ec7d40b2ae7b9e92c3b2527e
WRITE_HOLD machinery: no need for to bump mount_lock seqcount

... neither for insertion into the list of instances, nor for
mnt_{un,}hold_writers(), nor for mnt_get_write_access() deciding
to be nice to RT during a busy-wait loop - all of that only needs
the spinlock side of mount_lock.

IOW, it's mount_locked_reader, not mount_writer.

Clarify the comment re locking rules for mnt_unhold_writers() - it's
not just that mount_lock needs to be held when calling that, it must
have been held all along since the matching mnt_hold_writers().

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c