core: remove empty cgroups (#7457)
When we skip an unwritable cgroup also remove the empty mountpoint.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
64b21ece8c
commit
1ff654e28b
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user