mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
bpf: Use bpf_map_delete_elem() from the library
Replace bpf_map_delete() with bpf_map_delete_elem() calls. Signed-off-by: Mickaël Salaün <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e5ff7c4019
commit
e58383b803
5 changed files with 16 additions and 26 deletions
|
|
@ -124,7 +124,7 @@ int bpf_map_lookup_elem(int fd, const void *key, void *value)
|
|||
return sys_bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));
|
||||
}
|
||||
|
||||
int bpf_map_delete_elem(int fd, void *key)
|
||||
int bpf_map_delete_elem(int fd, const void *key)
|
||||
{
|
||||
union bpf_attr attr;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ int bpf_map_update_elem(int fd, const void *key, const void *value,
|
|||
__u64 flags);
|
||||
|
||||
int bpf_map_lookup_elem(int fd, const void *key, void *value);
|
||||
int bpf_map_delete_elem(int fd, void *key);
|
||||
int bpf_map_delete_elem(int fd, const void *key);
|
||||
int bpf_map_get_next_key(int fd, void *key, void *next_key);
|
||||
int bpf_obj_pin(int fd, const char *pathname);
|
||||
int bpf_obj_get(const char *pathname);
|
||||
|
|
|
|||
Loading…
Reference in a new issue