memcg: clean up move charge
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Wed, 26 May 2010 21:42:38 +0000 (14:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:12:43 +0000 (09:12 -0700)
commit90254a65833b67502d14736410b3857a15535c67
treee03ec501b4a585c0d112469f36100ec41a715345
parent3c11ecf448eff8f12922c498b8274ce98587eb74
memcg: clean up move charge

This patch cleans up move charge code by:

- define functions to handle pte for each types, and make
  is_target_pte_for_mc() cleaner.

- instead of checking the MOVE_CHARGE_TYPE_ANON bit, define a function
  that checks the bit.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c