On Mon, Aug 25, 2025 at 05:43:17AM +0100, Al Viro wrote: > The reason why it needs only mount_locked_reader is that there's no lockless > accesses of expiry lists. > > Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > --- > fs/namespace.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/namespace.c b/fs/namespace.c > index eabb0d996c6a..acacfe767a7c 100644 > --- a/fs/namespace.c > +++ b/fs/namespace.c > @@ -3858,9 +3858,8 @@ int finish_automount(struct vfsmount *m, const struct path *path) > */ > void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list) > { > - read_seqlock_excl(&mount_lock); > - list_add_tail(&real_mount(mnt)->mnt_expire, expiry_list); > - read_sequnlock_excl(&mount_lock); > + scoped_guard(mount_locked_reader) > + list_add_tail(&real_mount(mnt)->mnt_expire, expiry_list); Should also just use a guard(). I don't think religiously sticking to scoped_guard() out of conceptual aversion to guard() buys us anything. It's cleaner to read in such short functions very clearly.