Skip to content
Commit 33278f7f authored by Namhyung Kim's avatar Namhyung Kim Committed by Linus Torvalds
Browse files

memcg: fix off-by-one when calculating swap cgroup map length



It allocated one more page than necessary if @max_pages was a multiple of
SC_PER_PAGE.

Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: default avatarBalbir Singh <balbir@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 268433b8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment