diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index a02ebc2fa..532d63833 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -542,7 +542,7 @@ static int lxc_one_cgroup_create(const char *name, /* if cgparent does not exist, create it */ if (access(cgparent, F_OK)) { ret = mkdir(cgparent, 0755); - if (ret == -1 && errno == EEXIST) { + if (ret == -1 && errno != EEXIST) { SYSERROR("failed to create '%s' directory", cgparent); return -1; }