cgroups: s/container_limit_path/path_lim/g

parent 67ed60ce
...@@ -444,7 +444,7 @@ static int cgroup_tree_remove(struct hierarchy **hierarchies, const char *path_p ...@@ -444,7 +444,7 @@ static int cgroup_tree_remove(struct hierarchy **hierarchies, const char *path_p
else else
TRACE("Removed cgroup tree %d(%s)", h->dfd_base, path_prune); 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; return 0;
...@@ -810,9 +810,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf, ...@@ -810,9 +810,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
h->dfd_lim = move_fd(fd_limit); h->dfd_lim = move_fd(fd_limit);
if (limit_path) if (limit_path)
h->container_limit_path = move_ptr(limit_path); h->path_lim = move_ptr(limit_path);
else else
h->container_limit_path = h->path_con; h->path_lim = h->path_con;
} else { } else {
h->dfd_mon = move_fd(fd_final); h->dfd_mon = move_fd(fd_final);
} }
...@@ -830,7 +830,7 @@ static void cgroup_tree_prune_leaf(struct hierarchy *h, const char *path_prune, ...@@ -830,7 +830,7 @@ static void cgroup_tree_prune_leaf(struct hierarchy *h, const char *path_prune,
if (h->dfd_lim < 0) if (h->dfd_lim < 0)
prune = false; 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); close_equal(h->dfd_con, h->dfd_lim);
} else { } else {
/* Check whether we actually created the cgroup to prune. */ /* Check whether we actually created the cgroup to prune. */
...@@ -2039,7 +2039,7 @@ static const char *cgfsng_get_cgroup_do(struct cgroup_ops *ops, ...@@ -2039,7 +2039,7 @@ static const char *cgfsng_get_cgroup_do(struct cgroup_ops *ops,
"Failed to find hierarchy for controller \"%s\"", maybe_empty(controller)); "Failed to find hierarchy for controller \"%s\"", maybe_empty(controller));
if (limiting) if (limiting)
path = h->container_limit_path; path = h->path_lim;
else else
path = h->path_con; path = h->path_con;
if (!path) if (!path)
...@@ -2681,7 +2681,7 @@ static int cg_legacy_set_data(struct cgroup_ops *ops, const char *filename, ...@@ -2681,7 +2681,7 @@ static int cg_legacy_set_data(struct cgroup_ops *ops, const char *filename,
if (ret) if (ret)
return 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, __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
...@@ -2809,7 +2809,7 @@ __cgfsng_ops static bool cgfsng_setup_limits(struct cgroup_ops *ops, ...@@ -2809,7 +2809,7 @@ __cgfsng_ops static bool cgfsng_setup_limits(struct cgroup_ops *ops,
if (strnequal("devices", cg->subsystem, 7)) if (strnequal("devices", cg->subsystem, 7))
ret = bpf_device_cgroup_prepare(ops, conf, cg->subsystem, cg->value); ret = bpf_device_cgroup_prepare(ops, conf, cg->subsystem, cg->value);
else 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) if (ret < 0)
return log_error_errno(false, errno, "Failed to set \"%s\" to \"%s\"", cg->subsystem, cg->value); return log_error_errno(false, errno, "Failed to set \"%s\" to \"%s\"", cg->subsystem, cg->value);
......
...@@ -89,7 +89,7 @@ void cgroup_exit(struct cgroup_ops *ops) ...@@ -89,7 +89,7 @@ void cgroup_exit(struct cgroup_ops *ops)
free((*it)->at_base); free((*it)->at_base);
free_equal((*it)->path_con, free_equal((*it)->path_con,
(*it)->container_limit_path); (*it)->path_lim);
close_equal((*it)->dfd_con, (*it)->dfd_lim); close_equal((*it)->dfd_con, (*it)->dfd_lim);
......
...@@ -64,7 +64,7 @@ typedef enum { ...@@ -64,7 +64,7 @@ typedef enum {
* @path_con * @path_con
* - The full path to the container's cgroup. * - 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 * - The full path to the container's limiting cgroup. May simply point to
* path_con. * path_con.
* *
...@@ -83,7 +83,6 @@ struct hierarchy { ...@@ -83,7 +83,6 @@ struct hierarchy {
*/ */
char **cgroup2_chown; char **cgroup2_chown;
char **controllers; char **controllers;
char *container_limit_path;
cgroupfs_type_magic_t fs_type; cgroupfs_type_magic_t fs_type;
/* cgroup2 only */ /* cgroup2 only */
...@@ -96,10 +95,11 @@ struct hierarchy { ...@@ -96,10 +95,11 @@ struct hierarchy {
/* /*
* File descriptor for the container's limiting cgroup * 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. * Will be equal to @dfd_con if no limiting cgroup has been requested.
*/ */
int dfd_lim; int dfd_lim;
char *path_lim;
/* File descriptor for the monitor's cgroup. */ /* File descriptor for the monitor's cgroup. */
int dfd_mon; int dfd_mon;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment