diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-20 20:20:44 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-02 19:35:56 -0400 |
| commit | 550dda45df9e54d6b0cd34456f5987e0c7d7522a (patch) | |
| tree | 187e6cb8bc59ec9272d74429360975b29347893d | |
| parent | 7b99ee2c5c83b2df03c50bb2d61bdceb76189352 (diff) | |
mark_mounts_for_expiry(): use guards
Clean fit; guards can't be weaker due to umount_tree() calls.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | fs/namespace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 13e2f3837a26..898a6b7307e4 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3886,8 +3886,8 @@ void mark_mounts_for_expiry(struct list_head *mounts) if (list_empty(mounts)) return; - namespace_lock(); - lock_mount_hash(); + guard(namespace_excl)(); + guard(mount_writer)(); /* extract from the expiration list every vfsmount that matches the * following criteria: @@ -3909,8 +3909,6 @@ void mark_mounts_for_expiry(struct list_head *mounts) touch_mnt_namespace(mnt->mnt_ns); umount_tree(mnt, UMOUNT_PROPAGATE|UMOUNT_SYNC); } - unlock_mount_hash(); - namespace_unlock(); } EXPORT_SYMBOL_GPL(mark_mounts_for_expiry); |