diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-03-04 17:29:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:14 -0500 |
commit | 427d5416f317681498337ab19218d195edea02d6 (patch) | |
tree | 967cfc87ec775ca3c05f95f2339697e796383191 /mm/memcontrol.c | |
parent | bd845e38c7a7251a95a8f2c38aa7fb87140b771d (diff) |
memcg: move_lists on page not page_cgroup
Each caller of mem_cgroup_move_lists is having to use page_get_page_cgroup:
it's more convenient if it acts upon the page itself not the page_cgroup; and
in a later patch this becomes important to handle within memcontrol.c.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: David Rientjes <rientjes@google.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hirokazu Takahashi <taka@valinux.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 41041c0a6898..afdd406f618a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -407,11 +407,13 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) | |||
407 | /* | 407 | /* |
408 | * This routine assumes that the appropriate zone's lru lock is already held | 408 | * This routine assumes that the appropriate zone's lru lock is already held |
409 | */ | 409 | */ |
410 | void mem_cgroup_move_lists(struct page_cgroup *pc, bool active) | 410 | void mem_cgroup_move_lists(struct page *page, bool active) |
411 | { | 411 | { |
412 | struct page_cgroup *pc; | ||
412 | struct mem_cgroup_per_zone *mz; | 413 | struct mem_cgroup_per_zone *mz; |
413 | unsigned long flags; | 414 | unsigned long flags; |
414 | 415 | ||
416 | pc = page_get_page_cgroup(page); | ||
415 | if (!pc) | 417 | if (!pc) |
416 | return; | 418 | return; |
417 | 419 | ||