diff options
| author | Yang Shi <[email protected]> | 2021-05-04 18:36:26 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-05-05 11:27:23 -0700 |
| commit | 468ab8437a97a953895856c3709e48b3067da13c (patch) | |
| tree | 9825960fa4bd466f567148ca655b354e344f191d /tools/perf/scripts/python | |
| parent | e4262c4f51d6373447c9d89093f49ff6b1e607be (diff) | |
mm: vmscan: add shrinker_info_protected() helper
The shrinker_info is dereferenced in a couple of places via
rcu_dereference_protected with different calling conventions, for
example, using mem_cgroup_nodeinfo helper or dereferencing
memcg->nodeinfo[nid]->shrinker_info. And the later patch will add more
dereference places.
So extract the dereference into a helper to make the code more readable.
No functional change.
[[email protected]: retain rcu_dereference_protected() in free_shrinker_info(), per Hugh]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yang Shi <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Acked-by: Kirill Tkhai <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions