]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
namespace: rename drop_unused_mounts() → sort_and_drop_unused_mounts()
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Oct 2024 13:39:30 +0000 (15:39 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 9 Oct 2024 15:23:13 +0000 (16:23 +0100)
The function sorts the listed mounts, and that's kinda key, hence
reflect that in the name.

src/core/namespace.c

index dac476be271cbefbecc02d9844c9d267fb9a1a01..d13d57f11aa3fb8cd1c6c068e5f4ccdad4e55747 100644 (file)
@@ -1940,7 +1940,7 @@ static bool namespace_parameters_mount_apivfs(const NamespaceParameters *p) {
  * - that are outside of the relevant root directory
  * - which are duplicates
  */
-static void drop_unused_mounts(MountList *ml, const char *root_directory) {
+static void sort_and_drop_unused_mounts(MountList *ml, const char *root_directory) {
         assert(ml);
         assert(root_directory);
 
@@ -2085,7 +2085,7 @@ static int apply_mounts(
                 if (!again)
                         break;
 
-                drop_unused_mounts(ml, root);
+                sort_and_drop_unused_mounts(ml, root);
         }
 
         /* Now that all filesystems have been set up, but before the
@@ -2661,7 +2661,7 @@ int setup_namespace(const NamespaceParameters *p, char **error_path) {
         if (r < 0)
                 return r;
 
-        drop_unused_mounts(&ml, root);
+        sort_and_drop_unused_mounts(&ml, root);
 
         /* All above is just preparation, figuring out what to do. Let's now actually start doing something. */