From 1913ffb894c47f85ca6e7012d7c894cf7c700694 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Oct 2024 15:39:30 +0200 Subject: [PATCH] =?utf8?q?namespace:=20rename=20drop=5Funused=5Fmounts()?= =?utf8?q?=20=E2=86=92=20sort=5Fand=5Fdrop=5Funused=5Fmounts()?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The function sorts the listed mounts, and that's kinda key, hence reflect that in the name. --- src/core/namespace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/namespace.c b/src/core/namespace.c index dac476be271..d13d57f11aa 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -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. */ -- 2.47.3