summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/local_storage.c
diff options
context:
space:
mode:
authorRoman Gushchin2019-05-30 03:03:57 +0200
committerAlexei Starovoitov2019-06-01 01:52:56 +0200
commit3539b96e041c06e4317082816d90ec09160aeb11 (patch)
tree7e2ccf8b5526d8f13e8c5996b3b7ef76869a3012 /kernel/bpf/local_storage.c
parentbpf: add memlock precharge for socket local storage (diff)
downloadkernel-qcow2-linux-3539b96e041c06e4317082816d90ec09160aeb11.tar.gz
kernel-qcow2-linux-3539b96e041c06e4317082816d90ec09160aeb11.tar.xz
kernel-qcow2-linux-3539b96e041c06e4317082816d90ec09160aeb11.zip
bpf: group memory related fields in struct bpf_map_memory
Group "user" and "pages" fields of bpf_map into the bpf_map_memory structure. Later it can be extended with "memcg" and other related information. The main reason for a such change (beside cosmetics) is to pass bpf_map_memory structure to charging functions before the actual allocation of bpf_map. Signed-off-by: Roman Gushchin <guro@fb.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/local_storage.c')
-rw-r--r--kernel/bpf/local_storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c
index e48302ecb389..574325276650 100644
--- a/kernel/bpf/local_storage.c
+++ b/kernel/bpf/local_storage.c
@@ -303,7 +303,7 @@ static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr)
if (!map)
return ERR_PTR(-ENOMEM);
- map->map.pages = pages;
+ map->map.memory.pages = pages;
/* copy mandatory map attributes */
bpf_map_init_from_attr(&map->map, attr);