From 930eaac5eed23bb52061a50f674753a319216041 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 17 Aug 2018 15:46:11 -0700 Subject: mm/list_lru.c: fold __list_lru_count_one() into its caller __list_lru_count_one() has a single callsite. Acked-by: Vladimir Davydov Cc: Sebastian Andrzej Siewior Cc: Kirill Tkhai Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/list_lru.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/mm/list_lru.c b/mm/list_lru.c index fcfb6c89ed47..db679a057f46 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -162,26 +162,20 @@ void list_lru_isolate_move(struct list_lru_one *list, struct list_head *item, } EXPORT_SYMBOL_GPL(list_lru_isolate_move); -static unsigned long __list_lru_count_one(struct list_lru *lru, - int nid, int memcg_idx) +unsigned long list_lru_count_one(struct list_lru *lru, + int nid, struct mem_cgroup *memcg) { struct list_lru_node *nlru = &lru->node[nid]; struct list_lru_one *l; unsigned long count; rcu_read_lock(); - l = list_lru_from_memcg_idx(nlru, memcg_idx); + l = list_lru_from_memcg_idx(nlru, memcg_cache_id(memcg)); count = l->nr_items; rcu_read_unlock(); return count; } - -unsigned long list_lru_count_one(struct list_lru *lru, - int nid, struct mem_cgroup *memcg) -{ - return __list_lru_count_one(lru, nid, memcg_cache_id(memcg)); -} EXPORT_SYMBOL_GPL(list_lru_count_one); unsigned long list_lru_count_node(struct list_lru *lru, int nid) -- cgit v1.2.3