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
53 local_storage = rcu_dereference(cgroup->bpf_cgrp_storage); in bpf_cgrp_storage_free()
71 cgroup_storage_lookup(struct cgroup *cgroup, struct bpf_map *map, bool cacheit_lockit) in cgroup_storage_lookup() argument
76 cgroup_storage = rcu_dereference_check(cgroup->bpf_cgrp_storage, in cgroup_storage_lookup()
88 struct cgroup *cgroup; in bpf_cgrp_storage_lookup_elem() local
92 cgroup = cgroup_get_from_fd(fd); in bpf_cgrp_storage_lookup_elem()
93 if (IS_ERR(cgroup)) in bpf_cgrp_storage_lookup_elem()
94 return ERR_CAST(cgroup); in bpf_cgrp_storage_lookup_elem()
97 sdata = cgroup_storage_lookup(cgroup, map, true); in bpf_cgrp_storage_lookup_elem()
99 cgroup_put(cgroup); in bpf_cgrp_storage_lookup_elem()
107 struct cgroup *cgroup; in bpf_cgrp_storage_update_elem() local
111 cgroup = cgroup_get_from_fd(fd); in bpf_cgrp_storage_update_elem()
112 if (IS_ERR(cgroup)) in bpf_cgrp_storage_update_elem()
113 return PTR_ERR(cgroup); in bpf_cgrp_storage_update_elem()
116 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map, in bpf_cgrp_storage_update_elem()
119 cgroup_put(cgroup); in bpf_cgrp_storage_update_elem()
123 static int cgroup_storage_delete(struct cgroup *cgroup, struct bpf_map *map) in cgroup_storage_delete() argument
127 sdata = cgroup_storage_lookup(cgroup, map, false); in cgroup_storage_delete()
137 struct cgroup *cgroup; in bpf_cgrp_storage_delete_elem() local
141 cgroup = cgroup_get_from_fd(fd); in bpf_cgrp_storage_delete_elem()
142 if (IS_ERR(cgroup)) in bpf_cgrp_storage_delete_elem()
143 return PTR_ERR(cgroup); in bpf_cgrp_storage_delete_elem()
146 err = cgroup_storage_delete(cgroup, map); in bpf_cgrp_storage_delete_elem()
148 cgroup_put(cgroup); in bpf_cgrp_storage_delete_elem()
168 BPF_CALL_5(bpf_cgrp_storage_get, struct bpf_map *, map, struct cgroup *, cgroup, in BPF_CALL_5() argument
177 if (!cgroup) in BPF_CALL_5()
183 sdata = cgroup_storage_lookup(cgroup, map, true); in BPF_CALL_5()
188 if (!percpu_ref_is_dying(&cgroup->self.refcnt) && in BPF_CALL_5()
190 sdata = bpf_local_storage_update(cgroup, (struct bpf_local_storage_map *)map, in BPF_CALL_5()
198 BPF_CALL_2(bpf_cgrp_storage_delete, struct bpf_map *, map, struct cgroup *, cgroup) in BPF_CALL_2() argument
203 if (!cgroup) in BPF_CALL_2()
209 ret = cgroup_storage_delete(cgroup, map); in BPF_CALL_2()