]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
memcg: fix account leak at failure of memsw acconting
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tue, 25 Jan 2011 23:07:27 +0000 (15:07 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:47:17 +0000 (14:47 -0800)
commitca4cf61868e2bafeeb9f320e5da9b431e0f3aabd
tree2ce7cc38311d6f116cefde65f31d4e6dcb6d3224
parent6880ae16eeb4d4f34d9d6090fa8bc0beb9c6ed69
memcg: fix account leak at failure of memsw acconting

commit 01c88e2d6b7330c0cc5867fe2297e7d826e1337d upstream.

Commit 4b53433468 ("memcg: clean up try_charge main loop") removes a
cancel of charge at case: memory charge-> success.  mem+swap charge->
failure.

This leaks usage of memory.  Fix it.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/memcontrol.c