diff options
Diffstat (limited to 'kernel/bpf/hashtab.c')
| -rw-r--r-- | kernel/bpf/hashtab.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index b3ba43674310..83c209d9b17a 100644 --- a/kernel/bpf/hashtab.c +++ b/kernel/bpf/hashtab.c  | |||
| @@ -345,7 +345,7 @@ static void htab_map_free(struct bpf_map *map) | |||
| 345 | kfree(htab); | 345 | kfree(htab); | 
| 346 | } | 346 | } | 
| 347 | 347 | ||
| 348 | static struct bpf_map_ops htab_ops = { | 348 | static const struct bpf_map_ops htab_ops = { | 
| 349 | .map_alloc = htab_map_alloc, | 349 | .map_alloc = htab_map_alloc, | 
| 350 | .map_free = htab_map_free, | 350 | .map_free = htab_map_free, | 
| 351 | .map_get_next_key = htab_map_get_next_key, | 351 | .map_get_next_key = htab_map_get_next_key, | 
| @@ -354,14 +354,14 @@ static struct bpf_map_ops htab_ops = { | |||
| 354 | .map_delete_elem = htab_map_delete_elem, | 354 | .map_delete_elem = htab_map_delete_elem, | 
| 355 | }; | 355 | }; | 
| 356 | 356 | ||
| 357 | static struct bpf_map_type_list tl = { | 357 | static struct bpf_map_type_list htab_type __read_mostly = { | 
| 358 | .ops = &htab_ops, | 358 | .ops = &htab_ops, | 
| 359 | .type = BPF_MAP_TYPE_HASH, | 359 | .type = BPF_MAP_TYPE_HASH, | 
| 360 | }; | 360 | }; | 
| 361 | 361 | ||
| 362 | static int __init register_htab_map(void) | 362 | static int __init register_htab_map(void) | 
| 363 | { | 363 | { | 
| 364 | bpf_register_map_type(&tl); | 364 | bpf_register_map_type(&htab_type); | 
| 365 | return 0; | 365 | return 0; | 
| 366 | } | 366 | } | 
| 367 | late_initcall(register_htab_map); | 367 | late_initcall(register_htab_map); | 
