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); } EXPORT_SYMBOL(mnt_set_expiry); -- 2.47.2