From: Al Viro Date: Thu, 21 Aug 2025 01:58:03 +0000 (-0400) Subject: mnt_set_expiry(): use guards X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2605d8684320e6c09e56743e66ecac8ae581b464;p=users%2Fhch%2Fmisc.git mnt_set_expiry(): use guards The reason why it needs only mount_locked_reader is that there's no lockless accesses of expiry lists. Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- diff --git a/fs/namespace.c b/fs/namespace.c index 2cb3cb8307ca..db25c81d7f68 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3858,9 +3858,8 @@ discard: */ void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list) { - read_seqlock_excl(&mount_lock); + guard(mount_locked_reader)(); list_add_tail(&real_mount(mnt)->mnt_expire, expiry_list); - read_sequnlock_excl(&mount_lock); } EXPORT_SYMBOL(mnt_set_expiry);