memcg: cleanup cache_charge
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Thu, 2 Apr 2009 23:57:48 +0000 (16:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2009 02:04:56 +0000 (19:04 -0700)
commit83aae4c737866da3280f51fd15da58eddd788397
treea4fdabfb02949e0d44743850b7f37ae52eaed757
parent627991a20b3f4d504d20466ab405fe035cb1a20a
memcg: cleanup cache_charge

Current mem_cgroup_cache_charge is a bit complicated especially
in the case of shmem's swap-in.

This patch cleans it up by using try_charge_swapin and commit_charge_swapin.

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