Lines Matching refs:cgroup

41 	struct cgroup *cg = owner;  in cgroup_storage_ptr()
46 void bpf_cgrp_storage_free(struct cgroup *cgroup) in bpf_cgrp_storage_free() argument
51 local_storage = rcu_dereference(cgroup->bpf_cgrp_storage); in bpf_cgrp_storage_free()
64 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit) in cgroup_storage_lookup() argument
69 cgroup_storage = rcu_dereference_check(cgroup->bpf_cgrp_storage, in cgroup_storage_lookup()
81 struct cgroup *cgroup; in bpf_cgrp_storage_lookup_elem() local
85 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_lookup_elem()
86 if (IS_ERR(cgroup)) in bpf_cgrp_storage_lookup_elem()
87 return ERR_CAST(cgroup); in bpf_cgrp_storage_lookup_elem()
90 sdata = cgroup_storage_lookup(cgroup, map, true); in bpf_cgrp_storage_lookup_elem()
92 cgroup_put(cgroup); in bpf_cgrp_storage_lookup_elem()
100 struct cgroup *cgroup; in bpf_cgrp_storage_update_elem() local
104 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_update_elem()
105 if (IS_ERR(cgroup)) in bpf_cgrp_storage_update_elem()
106 return PTR_ERR(cgroup); in bpf_cgrp_storage_update_elem()
109 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map, in bpf_cgrp_storage_update_elem()
112 cgroup_put(cgroup); in bpf_cgrp_storage_update_elem()
116 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map) in cgroup_storage_delete() argument
120 sdata = cgroup_storage_lookup(cgroup, map, false); in cgroup_storage_delete()
130 struct cgroup *cgroup; in bpf_cgrp_storage_delete_elem() local
134 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_delete_elem()
135 if (IS_ERR(cgroup)) in bpf_cgrp_storage_delete_elem()
136 return PTR_ERR(cgroup); in bpf_cgrp_storage_delete_elem()
139 err = cgroup_storage_delete(cgroup, map); in bpf_cgrp_storage_delete_elem()
141 cgroup_put(cgroup); in bpf_cgrp_storage_delete_elem()
161 BPF_CALL_5(bpf_cgrp_storage_get, struct bpf_map *, map, struct cgroup *, cgroup, in BPF_CALL_5() argument
170 if (!cgroup) in BPF_CALL_5()
176 sdata = cgroup_storage_lookup(cgroup, map, true); in BPF_CALL_5()
181 if (!percpu_ref_is_dying(&cgroup->self.refcnt) && in BPF_CALL_5()
183 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map, in BPF_CALL_5()
191 BPF_CALL_2(bpf_cgrp_storage_delete, struct bpf_map *, map, struct cgroup *, cgroup) in BPF_CALL_2() argument
196 if (!cgroup) in BPF_CALL_2()
202 ret = cgroup_storage_delete(cgroup, map); in BPF_CALL_2()