diff options
author | Roman Gushchin <guro@fb.com> | 2020-12-01 22:58:28 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-12-03 03:28:06 +0100 |
commit | 270c6a71460e12b07b1dcadf7457ff95b6c6e8f4 (patch) | |
tree | e8193c62193e2da704a7fcd98d1961e5a03703a1 /net/ipv4/tcp_diag.c | |
parent | mm: memcontrol: Use helpers to read page's memcg data (diff) | |
download | linux-270c6a71460e12b07b1dcadf7457ff95b6c6e8f4.tar.xz linux-270c6a71460e12b07b1dcadf7457ff95b6c6e8f4.zip |
mm: memcontrol/slab: Use helpers to access slab page's memcg_data
To gather all direct accesses to struct page's memcg_data field in one
place, let's introduce 3 new helpers to use in the slab accounting code:
struct obj_cgroup **page_objcgs(struct page *page);
struct obj_cgroup **page_objcgs_check(struct page *page);
bool set_page_objcgs(struct page *page, struct obj_cgroup **objcgs);
They are similar to the corresponding API for generic pages, except that
the setter can return false, indicating that the value has been already
set from a different thread.
Signed-off-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lkml.kernel.org/r/20201027001657.3398190-3-guro@fb.com
Link: https://lore.kernel.org/bpf/20201201215900.3569844-3-guro@fb.com
Diffstat (limited to 'net/ipv4/tcp_diag.c')
0 files changed, 0 insertions, 0 deletions