From: Christian Brauner Date: Thu, 4 Feb 2021 19:27:40 +0000 (+0100) Subject: cgroups: check for correct error in __cg_unified_attach() from cgroup_attach() X-Git-Tag: lxc-5.0.0~301^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59114d805305928e4573d2e6936eb35e61f86ad2;p=thirdparty%2Flxc.git cgroups: check for correct error in __cg_unified_attach() from cgroup_attach() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 65aa97016..ee116cb66 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2415,7 +2415,7 @@ static int __cg_unified_attach(const struct hierarchy *h, ret = cgroup_attach(conf, name, lxcpath, pid); if (ret == 0) return log_trace(0, "Attached to unified cgroup via command handler"); - if (ret != -EBADF) + if (ret != -ENOCGROUP2) return log_error_errno(ret, errno, "Failed to attach to unified cgroup"); /* Fall back to retrieving the path for the unified cgroup. */