]> Git Repo - linux.git/commitdiff
mm/list_lru.c: pass lru argument to memcg_drain_list_lru_node()
authorKirill Tkhai <[email protected]>
Fri, 17 Aug 2018 22:48:01 +0000 (15:48 -0700)
committerLinus Torvalds <[email protected]>
Fri, 17 Aug 2018 23:20:31 +0000 (16:20 -0700)
This is just refactoring to allow next patches to have lru pointer in
memcg_drain_list_lru_node().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kirill Tkhai <[email protected]>
Acked-by: Vladimir Davydov <[email protected]>
Tested-by: Shakeel Butt <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: "Huang, Ying" <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Li RongQing <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Matthias Kaehlcke <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Sahitya Tummala <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Waiman Long <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/list_lru.c

index 5384cda08984603fb93fb6dc37cf787009e944ea..c6131925ec76e45b59bd3ff17c1a3e890bc72e4f 100644 (file)
@@ -501,9 +501,10 @@ fail:
        goto out;
 }
 
-static void memcg_drain_list_lru_node(struct list_lru_node *nlru,
+static void memcg_drain_list_lru_node(struct list_lru *lru, int nid,
                                      int src_idx, struct mem_cgroup *dst_memcg)
 {
+       struct list_lru_node *nlru = &lru->node[nid];
        int dst_idx = dst_memcg->kmemcg_id;
        struct list_lru_one *src, *dst;
 
@@ -532,7 +533,7 @@ static void memcg_drain_list_lru(struct list_lru *lru,
                return;
 
        for_each_node(i)
-               memcg_drain_list_lru_node(&lru->node[i], src_idx, dst_memcg);
+               memcg_drain_list_lru_node(lru, i, src_idx, dst_memcg);
 }
 
 void memcg_drain_all_list_lrus(int src_idx, struct mem_cgroup *dst_memcg)
This page took 0.057127 seconds and 4 git commands to generate.