diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-06-25 14:57:02 +0200 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-09-27 15:27:31 +0200 |
commit | 2ab082ba76f99ba83a496e7bbe3082d6d5096d1e (patch) | |
tree | 284113dbcd9740d121860076644b0eacd46a5c9d /mm/memcontrol.c | |
parent | mm/memcg: Use the node id in mem_cgroup_update_tree() (diff) | |
download | linux-2ab082ba76f99ba83a496e7bbe3082d6d5096d1e.tar.xz linux-2ab082ba76f99ba83a496e7bbe3082d6d5096d1e.zip |
mm/memcg: Remove soft_limit_tree_node()
Opencode this one-line function in its three callers.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to '')
-rw-r--r-- | mm/memcontrol.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ac6ed42ca141..316d005566b8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -456,12 +456,6 @@ ino_t page_cgroup_ino(struct page *page) return ino; } -static struct mem_cgroup_tree_per_node * -soft_limit_tree_node(int nid) -{ - return soft_limit_tree.rb_tree_per_node[nid]; -} - static void __mem_cgroup_insert_exceeded(struct mem_cgroup_per_node *mz, struct mem_cgroup_tree_per_node *mctz, unsigned long new_usage_in_excess) @@ -538,7 +532,7 @@ static void mem_cgroup_update_tree(struct mem_cgroup *memcg, int nid) struct mem_cgroup_per_node *mz; struct mem_cgroup_tree_per_node *mctz; - mctz = soft_limit_tree_node(nid); + mctz = soft_limit_tree.rb_tree_per_node[nid]; if (!mctz) return; /* @@ -577,7 +571,7 @@ static void mem_cgroup_remove_from_trees(struct mem_cgroup *memcg) for_each_node(nid) { mz = memcg->nodeinfo[nid]; - mctz = soft_limit_tree_node(nid); + mctz = soft_limit_tree.rb_tree_per_node[nid]; if (mctz) mem_cgroup_remove_exceeded(mz, mctz); } @@ -3364,7 +3358,7 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, if (order > 0) return 0; - mctz = soft_limit_tree_node(pgdat->node_id); + mctz = soft_limit_tree.rb_tree_per_node[pgdat->node_id]; /* * Do not even bother to check the largest node if the root |