summaryrefslogtreecommitdiffstats
path: root/src/shared/mount-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-06-02 17:50:50 +0200
committerLennart Poettering <lennart@poettering.net>2023-06-02 18:43:10 +0200
commitd58506562407a6b224326cae52cdb369f8bf756c (patch)
tree6baf729ea17a8923708abba45da03d12ed845b7c /src/shared/mount-setup.c
parentswitch-root: automatically make target switch root dir a mount point (diff)
downloadsystemd-d58506562407a6b224326cae52cdb369f8bf756c.tar.xz
systemd-d58506562407a6b224326cae52cdb369f8bf756c.zip
mount-setup: exclude /run/nextroot/ from relabelling
Just like /run/initramfs/ the data in /run/nextroot/ should be a self-contained OS tree, and not require labelling, hence don't.
Diffstat (limited to 'src/shared/mount-setup.c')
-rw-r--r--src/shared/mount-setup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c
index fd14cd8598..ede4e8483a 100644
--- a/src/shared/mount-setup.c
+++ b/src/shared/mount-setup.c
@@ -376,8 +376,9 @@ static int relabel_cb(
return RECURSE_DIR_CONTINUE;
case RECURSE_DIR_ENTER:
- /* /run/initramfs is static data and big, no need to dynamically relabel its contents at boot... */
- if (path_equal(path, "/run/initramfs"))
+ /* /run/initramfs/ + /run/nextroot/ are static data and big, no need to dynamically relabel
+ * its contents at boot... */
+ if (PATH_STARTSWITH_SET(path, "/run/initramfs", "/run/nextroot"))
return RECURSE_DIR_SKIP_ENTRY;
_fallthrough_;