memcg: fix refcnt handling at swapoff
authorKAMEZAWA Hiroyuki <[email protected]>
Thu, 29 Jan 2009 22:25:13 +0000 (14:25 -0800)
committerLinus Torvalds <[email protected]>
Fri, 30 Jan 2009 02:04:43 +0000 (18:04 -0800)
commit85d9fc89fb0f0703df6444f260187c088a8d59ff
treeba034e2b8bff6b7f3b62a826a0106dc0e1391b46
parent7460db567bbca76bf087d1694d792a1a96bdaa26
memcg: fix refcnt handling at swapoff

Now, at swapoff, even while try_charge() fails, commit is executed.  This
is a bug which turns the refcnt of cgroup_subsys_state negative.

Reported-by: Li Zefan <[email protected]>
Tested-by: Li Zefan <[email protected]>
Tested-by: Daisuke Nishimura <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Daisuke Nishimura <[email protected]>
Cc: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/swapfile.c