Skip to content

Commit

Permalink
cgroups: check for correct error in __cg_unified_attach() from cgroup…
Browse files Browse the repository at this point in the history
…_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 26, 2021
1 parent cb17f83 commit f6666d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/cgroups/cgfsng.c
Expand Up @@ -2414,7 +2414,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. */
Expand Down

0 comments on commit f6666d3

Please sign in to comment.