Lines Matching refs:cgroup
39 struct cgroup *cg = owner; in cgroup_storage_ptr()
44 void bpf_cgrp_storage_free(struct cgroup *cgroup) in bpf_cgrp_storage_free() argument
50 local_storage = rcu_dereference(cgroup->bpf_cgrp_storage); in bpf_cgrp_storage_free()
63 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit) in cgroup_storage_lookup() argument
68 cgroup_storage = rcu_dereference_check(cgroup->bpf_cgrp_storage, in cgroup_storage_lookup()
80 struct cgroup *cgroup; in bpf_cgrp_storage_lookup_elem() local
84 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_lookup_elem()
85 if (IS_ERR(cgroup)) in bpf_cgrp_storage_lookup_elem()
86 return ERR_CAST(cgroup); in bpf_cgrp_storage_lookup_elem()
89 sdata = cgroup_storage_lookup(cgroup, map, true); in bpf_cgrp_storage_lookup_elem()
91 cgroup_put(cgroup); in bpf_cgrp_storage_lookup_elem()
99 struct cgroup *cgroup; in bpf_cgrp_storage_update_elem() local
103 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_update_elem()
104 if (IS_ERR(cgroup)) in bpf_cgrp_storage_update_elem()
105 return PTR_ERR(cgroup); in bpf_cgrp_storage_update_elem()
108 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map, in bpf_cgrp_storage_update_elem()
111 cgroup_put(cgroup); in bpf_cgrp_storage_update_elem()
115 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map) in cgroup_storage_delete() argument
119 sdata = cgroup_storage_lookup(cgroup, map, false); in cgroup_storage_delete()
129 struct cgroup *cgroup; in bpf_cgrp_storage_delete_elem() local
133 cgroup = cgroup_v1v2_get_from_fd(fd); in bpf_cgrp_storage_delete_elem()
134 if (IS_ERR(cgroup)) in bpf_cgrp_storage_delete_elem()
135 return PTR_ERR(cgroup); in bpf_cgrp_storage_delete_elem()
138 err = cgroup_storage_delete(cgroup, map); in bpf_cgrp_storage_delete_elem()
140 cgroup_put(cgroup); in bpf_cgrp_storage_delete_elem()
160 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()
175 sdata = cgroup_storage_lookup(cgroup, map, nobusy); in BPF_CALL_5()
180 if (!percpu_ref_is_dying(&cgroup->self.refcnt) && in BPF_CALL_5()
182 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()