From 5a8af538aee99741ab492506b4284fdd26b597d1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 13 May 2015 14:04:55 +0200 Subject: nspawn: rework custom mount point order, and add support for overlayfs Previously all bind mount mounts were applied in the order specified, followed by all tmpfs mounts in the order specified. This is problematic, if bind mounts shall be placed within tmpfs mounts. This patch hence reworks the custom mount point logic, and alwas applies them in strict prefix-first order. This means the order of mounts specified on the command line becomes irrelevant, the right operation will always be executed. While we are at it this commit also adds native support for overlayfs mounts, as supported by recent kernels. --- src/core/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/namespace.c') diff --git a/src/core/namespace.c b/src/core/namespace.c index 718da2384d..bee2839f54 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -87,7 +87,7 @@ static int mount_path_compare(const void *a, const void *b) { d = path_compare(p->path, q->path); - if (!d) { + if (d == 0) { /* If the paths are equal, check the mode */ if (p->mode < q->mode) return -1; -- cgit v1.2.3-54-g00ecf