mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 09:02:21 -04:00
bpf: Copy map value using copy_map_value_long for percpu_cgroup_storage maps
Copy map value using 'copy_map_value_long()'. It's to keep consistent style with the way of other percpu maps. No functional change intended. Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Link: https://lore.kernel.org/r/20260107022022.12843-5-leon.hwang@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
c6936161fd
commit
8526397c3c
@@ -200,8 +200,7 @@ int bpf_percpu_cgroup_storage_copy(struct bpf_map *_map, void *key,
|
||||
*/
|
||||
size = round_up(_map->value_size, 8);
|
||||
for_each_possible_cpu(cpu) {
|
||||
bpf_long_memcpy(value + off,
|
||||
per_cpu_ptr(storage->percpu_buf, cpu), size);
|
||||
copy_map_value_long(_map, value + off, per_cpu_ptr(storage->percpu_buf, cpu));
|
||||
off += size;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
@@ -234,8 +233,7 @@ int bpf_percpu_cgroup_storage_update(struct bpf_map *_map, void *key,
|
||||
*/
|
||||
size = round_up(_map->value_size, 8);
|
||||
for_each_possible_cpu(cpu) {
|
||||
bpf_long_memcpy(per_cpu_ptr(storage->percpu_buf, cpu),
|
||||
value + off, size);
|
||||
copy_map_value_long(_map, per_cpu_ptr(storage->percpu_buf, cpu), value + off);
|
||||
off += size;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
Reference in New Issue
Block a user