mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:20:49 +07:00
mm/list_lru.c: fold __list_lru_count_one() into its caller
__list_lru_count_one() has a single callsite. Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Kirill Tkhai <ktkhai@virtuozzo.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6ca342d020
commit
930eaac5ee
@ -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);
|
EXPORT_SYMBOL_GPL(list_lru_isolate_move);
|
||||||
|
|
||||||
static unsigned long __list_lru_count_one(struct list_lru *lru,
|
unsigned long list_lru_count_one(struct list_lru *lru,
|
||||||
int nid, int memcg_idx)
|
int nid, struct mem_cgroup *memcg)
|
||||||
{
|
{
|
||||||
struct list_lru_node *nlru = &lru->node[nid];
|
struct list_lru_node *nlru = &lru->node[nid];
|
||||||
struct list_lru_one *l;
|
struct list_lru_one *l;
|
||||||
unsigned long count;
|
unsigned long count;
|
||||||
|
|
||||||
rcu_read_lock();
|
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;
|
count = l->nr_items;
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
return count;
|
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);
|
EXPORT_SYMBOL_GPL(list_lru_count_one);
|
||||||
|
|
||||||
unsigned long list_lru_count_node(struct list_lru *lru, int nid)
|
unsigned long list_lru_count_node(struct list_lru *lru, int nid)
|
||||||
|
Loading…
Reference in New Issue
Block a user