memcg: fix unit mismatch in memcg oom limit calculation
memcg: fix unit mismatch in memcg oom limit calculation

Adding the number of swap pages to the byte limit of a memory control
group makes no sense.  Convert the pages to bytes before adding them.

The only user of this code is the OOM killer, and the way it is used means
that the error results in a higher OOM badness value.  Since the cgroup
limit is the same for all tasks in the cgroup, the error should have no
practical impact at the moment.

But let's not wait for future or changing users to trip over it.

Signed-off-by: Johannes Weiner <331be22c6b63ca3e0a03d408c2d906b1b02cd5f2@cmpxchg.org>
Cc: Greg Thelen <1cad85f151cc543af57dbef9a3c3fce0b81e874a@google.com>
Cc: David Rientjes <d8cd2994e15bc61ddb2b113030bda55eebc3a0fe@google.com>
Acked-by: KAMEZAWA Hiroyuki <634f508bd7c47cf0ee4126243675c3e598920fbc@jp.fujitsu.com>
Cc: Balbir Singh <65a1aed538f36fed73d8c45e9ddfc585ce9f4abf@in.ibm.com>
Cc: Daisuke Nishimura <d7ce9d9454f80efacebffaaa82023b8c983997f5@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas