Skip to content

Commit e6422d8

Browse files
AsphalttKernel Patches Daemon
authored andcommitted
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 <[email protected]>
1 parent 6bbb21d commit e6422d8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kernel/bpf/local_storage.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ int bpf_percpu_cgroup_storage_copy(struct bpf_map *_map, void *key,
200200
*/
201201
size = round_up(_map->value_size, 8);
202202
for_each_possible_cpu(cpu) {
203-
bpf_long_memcpy(value + off,
204-
per_cpu_ptr(storage->percpu_buf, cpu), size);
203+
copy_map_value_long(_map, value + off, per_cpu_ptr(storage->percpu_buf, cpu));
205204
off += size;
206205
}
207206
rcu_read_unlock();
@@ -234,8 +233,7 @@ int bpf_percpu_cgroup_storage_update(struct bpf_map *_map, void *key,
234233
*/
235234
size = round_up(_map->value_size, 8);
236235
for_each_possible_cpu(cpu) {
237-
bpf_long_memcpy(per_cpu_ptr(storage->percpu_buf, cpu),
238-
value + off, size);
236+
copy_map_value_long(_map, per_cpu_ptr(storage->percpu_buf, cpu), value + off);
239237
off += size;
240238
}
241239
rcu_read_unlock();

0 commit comments

Comments
 (0)