else
TRACE("Removed cgroup tree %d(%s)", h->dfd_base, path_prune);
- free_equal(h->container_limit_path, h->path_con);
+ free_equal(h->path_lim, h->path_con);
}
return 0;
h->dfd_lim = move_fd(fd_limit);
if (limit_path)
- h->container_limit_path = move_ptr(limit_path);
+ h->path_lim = move_ptr(limit_path);
else
- h->container_limit_path = h->path_con;
+ h->path_lim = h->path_con;
} else {
h->dfd_mon = move_fd(fd_final);
}
if (h->dfd_lim < 0)
prune = false;
- free_equal(h->path_con, h->container_limit_path);
+ free_equal(h->path_con, h->path_lim);
close_equal(h->dfd_con, h->dfd_lim);
} else {
/* Check whether we actually created the cgroup to prune. */
"Failed to find hierarchy for controller \"%s\"", maybe_empty(controller));
if (limiting)
- path = h->container_limit_path;
+ path = h->path_lim;
else
path = h->path_con;
if (!path)
if (ret)
return ret;
}
- return lxc_write_openat(h->container_limit_path, filename, value, strlen(value));
+ return lxc_write_openat(h->path_lim, filename, value, strlen(value));
}
__cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
if (strnequal("devices", cg->subsystem, 7))
ret = bpf_device_cgroup_prepare(ops, conf, cg->subsystem, cg->value);
else
- ret = lxc_write_openat(h->container_limit_path, cg->subsystem, cg->value, strlen(cg->value));
+ ret = lxc_write_openat(h->path_lim, cg->subsystem, cg->value, strlen(cg->value));
if (ret < 0)
return log_error_errno(false, errno, "Failed to set \"%s\" to \"%s\"", cg->subsystem, cg->value);
* @path_con
* - The full path to the container's cgroup.
*
- * @container_limit_path
+ * @path_lim
* - The full path to the container's limiting cgroup. May simply point to
* path_con.
*
*/
char **cgroup2_chown;
char **controllers;
- char *container_limit_path;
cgroupfs_type_magic_t fs_type;
/* cgroup2 only */
/*
* File descriptor for the container's limiting cgroup
- * @container_limit_path.
+ * @path_lim.
* Will be equal to @dfd_con if no limiting cgroup has been requested.
*/
int dfd_lim;
+ char *path_lim;
/* File descriptor for the monitor's cgroup. */
int dfd_mon;