]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Jan 2011 00:50:03 +0000 (10:50 +1000)
commit1314951dc8f229b888929d26fb9724500dcaab63
tree0a905aa1558af7fd401d768ead121e2b11a4a2f4
parent686e666be3e31752961201198e927bd06fdf45c3
memcg: fix account leak at failure of memsw acconting

Commit a218f8a34b ("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>
Cc: <stable@kernel.org> [2.6.36+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c