Lines Matching defs:cgroup

39 	struct cgroup *cg = owner;
44 void bpf_cgrp_storage_free(struct cgroup *cgroup)
49 local_storage = rcu_dereference(cgroup->bpf_cgrp_storage);
61 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit)
66 cgroup_storage = rcu_dereference_check(cgroup->bpf_cgrp_storage,
78 struct cgroup *cgroup;
82 cgroup = cgroup_v1v2_get_from_fd(fd);
83 if (IS_ERR(cgroup))
84 return ERR_CAST(cgroup);
87 sdata = cgroup_storage_lookup(cgroup, map, true);
89 cgroup_put(cgroup);
97 struct cgroup *cgroup;
101 cgroup = cgroup_v1v2_get_from_fd(fd);
102 if (IS_ERR(cgroup))
103 return PTR_ERR(cgroup);
106 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map,
109 cgroup_put(cgroup);
113 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map)
117 sdata = cgroup_storage_lookup(cgroup, map, false);
127 struct cgroup *cgroup;
131 cgroup = cgroup_v1v2_get_from_fd(fd);
132 if (IS_ERR(cgroup))
133 return PTR_ERR(cgroup);
136 err = cgroup_storage_delete(cgroup, map);
138 cgroup_put(cgroup);
158 BPF_CALL_5(bpf_cgrp_storage_get, struct bpf_map *, map, struct cgroup *, cgroup,
168 if (!cgroup)
173 sdata = cgroup_storage_lookup(cgroup, map, nobusy);
177 /* only allocate new storage, when the cgroup is refcounted */
178 if (!percpu_ref_is_dying(&cgroup->self.refcnt) &&
180 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map,
189 BPF_CALL_2(bpf_cgrp_storage_delete, struct bpf_map *, map, struct cgroup *, cgroup)
194 if (!cgroup)
200 ret = cgroup_storage_delete(cgroup, map);