]> www.infradead.org Git - users/hch/misc.git/commitdiff
propagate_mnt(): use scoped_guard(mount_locked_reader) for mnt_set_mountpoint()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Aug 2025 01:40:07 +0000 (21:40 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Sep 2025 23:35:57 +0000 (19:35 -0400)
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/pnode.c

index 6f7d02f3fa985f7ec335c0f59b17cf9f82743689..0702d45d856dd9f7513236ddc2b28293326b93c0 100644 (file)
@@ -304,9 +304,8 @@ int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp,
                                err = PTR_ERR(this);
                                break;
                        }
-                       read_seqlock_excl(&mount_lock);
-                       mnt_set_mountpoint(n, dest_mp, this);
-                       read_sequnlock_excl(&mount_lock);
+                       scoped_guard(mount_locked_reader)
+                               mnt_set_mountpoint(n, dest_mp, this);
                        if (n->mnt_master)
                                SET_MNT_MARK(n->mnt_master);
                        copy = this;