summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-04-27 16:13:51 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-07 22:43:29 +0200
commit14a25e1faee2eff04b178ed4ebbb1bd131ce2261 (patch)
tree62276f6691030761d338fcc7d827a0960442a86b /src/nspawn
parent6c045a999800c62368470938307951bb669f5afc (diff)
downloadsystemd-14a25e1faee2eff04b178ed4ebbb1bd131ce2261.tar.gz
mount-util: add helper that ensures something is a mount point
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index ee84495ca2..38d6eeacc7 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3688,11 +3688,9 @@ static int outer_child(
return r;
/* Make sure we always have a mount that we can move to root later on. */
- if (!path_is_mount_point(directory, NULL, 0)) {
- r = mount_nofollow_verbose(LOG_ERR, directory, directory, NULL, MS_BIND|MS_REC, NULL);
- if (r < 0)
- return r;
- }
+ r = make_mount_point(directory);
+ if (r < 0)
+ return r;
if (dissected_image) {
/* Now we know the uid shift, let's now mount everything else that might be in the image. */