memcg: memory swap controller: fix limit check
authorDaisuke Nishimura <[email protected]>
Thu, 8 Jan 2009 02:08:12 +0000 (18:08 -0800)
committerLinus Torvalds <[email protected]>
Thu, 8 Jan 2009 16:31:07 +0000 (08:31 -0800)
commitb85a96c0b6cb79c67e7b01b66368f2e31579d7c5
tree178005176284faef0f8a47293eaddd2885062f53
parentf9717d28d673468883df8ac34b47268719ac5a3d
memcg: memory swap controller: fix limit check

There are scatterd calls of res_counter_check_under_limit(), and most of
them don't take mem+swap accounting into account.

define mem_cgroup_check_under_limit() and avoid direct use of
res_counter_check_limit().

Reported-by: Daisuke Nishimura <[email protected]>
Signed-off-by: Daisuke Nishimura <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c