cgroups: s/cgfd_limit/dfd_lim/g

parent 1116fcb3
......@@ -402,7 +402,7 @@ static int cgroup_hierarchy_add(struct cgroup_ops *ops, int dfd_mnt, char *mnt,
return ret_errno(ENOMEM);
new->dfd_con = -EBADF;
new->cgfd_limit = -EBADF;
new->dfd_lim = -EBADF;
new->dfd_mon = -EBADF;
new->fs_type = fs_type;
......@@ -805,9 +805,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
h->container_full_path = move_ptr(path);
if (fd_limit < 0)
h->cgfd_limit = h->dfd_con;
h->dfd_lim = h->dfd_con;
else
h->cgfd_limit = move_fd(fd_limit);
h->dfd_lim = move_fd(fd_limit);
if (limit_path)
h->container_limit_path = move_ptr(limit_path);
......@@ -827,11 +827,11 @@ static void cgroup_tree_prune_leaf(struct hierarchy *h, const char *path_prune,
if (payload) {
/* Check whether we actually created the cgroup to prune. */
if (h->cgfd_limit < 0)
if (h->dfd_lim < 0)
prune = false;
free_equal(h->container_full_path, h->container_limit_path);
close_equal(h->dfd_con, h->cgfd_limit);
close_equal(h->dfd_con, h->dfd_lim);
} else {
/* Check whether we actually created the cgroup to prune. */
if (h->dfd_mon < 0)
......
......@@ -91,7 +91,7 @@ void cgroup_exit(struct cgroup_ops *ops)
free_equal((*it)->container_full_path,
(*it)->container_limit_path);
close_equal((*it)->dfd_con, (*it)->cgfd_limit);
close_equal((*it)->dfd_con, (*it)->dfd_lim);
if ((*it)->dfd_mon >= 0)
close((*it)->dfd_mon);
......
......@@ -99,7 +99,7 @@ struct hierarchy {
* @container_limit_path.
* Will be equal to @dfd_con if no limiting cgroup has been requested.
*/
int cgfd_limit;
int dfd_lim;
/* File descriptor for the monitor's cgroup. */
int dfd_mon;
......
......@@ -609,7 +609,7 @@ bool bpf_cgroup_devices_attach(struct cgroup_ops *ops,
return syserrno(false, "Failed to create bpf program");
ret = bpf_program_cgroup_attach(prog, BPF_CGROUP_DEVICE,
ops->unified->cgfd_limit,
ops->unified->dfd_lim,
BPF_F_ALLOW_MULTI);
if (ret)
return syserrno(false, "Failed to attach bpf program");
......@@ -635,7 +635,7 @@ bool bpf_cgroup_devices_update(struct cgroup_ops *ops,
if (!pure_unified_layout(ops))
return ret_set_errno(false, EINVAL);
if (ops->unified->cgfd_limit < 0)
if (ops->unified->dfd_lim < 0)
return ret_set_errno(false, EBADF);
/*
......
......@@ -898,7 +898,7 @@ static int lxc_cmd_stop_callback(int fd, struct lxc_cmd_req *req,
TRACE("Sent signal %d to pidfd %d", stopsignal, handler->pid);
if (pure_unified_layout(cgroup_ops))
ret = __cgroup_unfreeze(cgroup_ops->unified->cgfd_limit, -1);
ret = __cgroup_unfreeze(cgroup_ops->unified->dfd_lim, -1);
else
ret = cgroup_ops->unfreeze(cgroup_ops, -1);
if (ret)
......@@ -1518,7 +1518,7 @@ static int lxc_cmd_get_cgroup2_fd_callback_do(int fd, struct lxc_cmd_req *req,
if (!pure_unified_layout(ops) || !ops->unified)
return lxc_cmd_rsp_send(fd, &rsp);
send_fd = limiting_cgroup ? ops->unified->cgfd_limit
send_fd = limiting_cgroup ? ops->unified->dfd_lim
: ops->unified->dfd_con;
rsp.ret = 0;
......
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