]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - kernel/bpf/arraymap.c
Merge branch 'ebpf_helpers'
[mirror_ubuntu-zesty-kernel.git] / kernel / bpf / arraymap.c
index 9eb4d8a7cd870b513d9d19e2707bc2950e91f744..8a6616583f38adce1e90ecc19b3bce92e01d2f83 100644 (file)
@@ -134,7 +134,7 @@ static void array_map_free(struct bpf_map *map)
        kvfree(array);
 }
 
-static struct bpf_map_ops array_ops = {
+static const struct bpf_map_ops array_ops = {
        .map_alloc = array_map_alloc,
        .map_free = array_map_free,
        .map_get_next_key = array_map_get_next_key,
@@ -143,14 +143,14 @@ static struct bpf_map_ops array_ops = {
        .map_delete_elem = array_map_delete_elem,
 };
 
-static struct bpf_map_type_list tl = {
+static struct bpf_map_type_list array_type __read_mostly = {
        .ops = &array_ops,
        .type = BPF_MAP_TYPE_ARRAY,
 };
 
 static int __init register_array_map(void)
 {
-       bpf_register_map_type(&tl);
+       bpf_register_map_type(&array_type);
        return 0;
 }
 late_initcall(register_array_map);