From: Christian Brauner Date: Fri, 24 Nov 2017 20:05:16 +0000 (+0100) Subject: core: remove empty cgroups (#7457) X-Git-Tag: v236~120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ff654e28b7b8e7d0a0be33522a84069ac6b07c0;p=thirdparty%2Fsystemd.git core: remove empty cgroups (#7457) When we skip an unwritable cgroup also remove the empty mountpoint. --- 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; } }