diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-17 22:13:26 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-18 16:54:25 -0500 |
commit | 32852649ba3f74aab10025f2e59ca2b49d5cccfa (patch) | |
tree | 883978611967a49e1fcea529e161c0b931a0d095 /kernel/bpf/arraymap.c | |
parent | ad46061fca87c0ab6670af3a44e03237f99d7a1f (diff) |
bpf: arraymap: use bpf_map_init_from_attr()
Arraymap was not converted to use bpf_map_init_from_attr()
to avoid merge conflicts with emergency fixes. Do it now.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 68336092bfb4..b1f66480135b 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c | |||
@@ -120,12 +120,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr) | |||
120 | array->map.unpriv_array = unpriv; | 120 | array->map.unpriv_array = unpriv; |
121 | 121 | ||
122 | /* copy mandatory map attributes */ | 122 | /* copy mandatory map attributes */ |
123 | array->map.map_type = attr->map_type; | 123 | bpf_map_init_from_attr(&array->map, attr); |
124 | array->map.key_size = attr->key_size; | ||
125 | array->map.value_size = attr->value_size; | ||
126 | array->map.max_entries = attr->max_entries; | ||
127 | array->map.map_flags = attr->map_flags; | ||
128 | array->map.numa_node = numa_node; | ||
129 | array->elem_size = elem_size; | 124 | array->elem_size = elem_size; |
130 | 125 | ||
131 | if (!percpu) | 126 | if (!percpu) |