From 59114d805305928e4573d2e6936eb35e61f86ad2 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 4 Feb 2021 20:27:40 +0100 Subject: [PATCH] cgroups: check for correct error in __cg_unified_attach() from cgroup_attach() Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.47.2