mm/zsmalloc: allocate exactly size of struct zs_pool
authorGanesh Mahendran <opensource.ganesh@gmail.com>
Sat, 13 Dec 2014 00:57:10 +0000 (16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 20:42:50 +0000 (12:42 -0800)
commit181366561ac1e1a7bc3b91dbe45e7614a2f758b9
tree559d989501ca9e8735518a5ae6b7267ea24a5df3
parentdf8b5bb998f10cfc040ad30300f9a9ea4592ff82
mm/zsmalloc: allocate exactly size of struct zs_pool

In zs_create_pool(), we allocate memory more then sizeof(struct zs_pool)
  ovhd_size = roundup(sizeof(*pool), PAGE_SIZE);

This patch allocate memory of exactly needed size.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/zsmalloc.c