From 1ff654e28b7b8e7d0a0be33522a84069ac6b07c0 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 24 Nov 2017 21:05:16 +0100 Subject: [PATCH] core: remove empty cgroups (#7457) When we skip an unwritable cgroup also remove the empty mountpoint. --- src/core/mount-setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 86b25424b27..d5c0fcddcb1 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -208,6 +208,7 @@ static int mount_one(const MountPoint *p, bool relabel) { r = access(p->where, W_OK); if (r < 0) { (void) umount(p->where); + (void) rmdir(p->where); return (p->mode & MNT_FATAL) ? r : 0; } } -- 2.47.3