From 2605d8684320e6c09e56743e66ecac8ae581b464 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 20 Aug 2025 21:58:03 -0400 Subject: [PATCH] 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 --- fs/namespace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 2cb3cb8307ca0..db25c81d7f68f 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); -- 2.47.3