summaryrefslogtreecommitdiffstats
path: root/mm/kasan
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2017-07-10 15:50:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 16:32:33 -0700
commitcf8e0fedf0784ef4bc1889380b09eda295e3d109 (patch)
tree2f69f70cb8cea77fd5e2ab08b581358c90dda699 /mm/kasan
parentbc1bb362334ebc4c65dd4301f10fb70902b3db7d (diff)
downloadlinux-stable-cf8e0fedf0784ef4bc1889380b09eda295e3d109.tar.gz
linux-stable-cf8e0fedf0784ef4bc1889380b09eda295e3d109.tar.bz2
linux-stable-cf8e0fedf0784ef4bc1889380b09eda295e3d109.zip
mm/zsmalloc: simplify zs_max_alloc_size handling
Commit 40f9fb8cffc6 ("mm/zsmalloc: support allocating obj with size of ZS_MAX_ALLOC_SIZE") fixes a size calculation error that prevented zsmalloc to allocate an object of the maximal size (ZS_MAX_ALLOC_SIZE). I think however the fix is unneededly complicated. This patch replaces the dynamic calculation of zs_size_classes at init time by a compile time calculation that uses the DIV_ROUND_UP() macro already used in get_size_class_index(). [akpm@linux-foundation.org: use min_t] Link: http://lkml.kernel.org/r/20170630114859.1979-1-jmarchan@redhat.com Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Cc: Mahendran Ganesh <opensource.ganesh@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/kasan')
0 files changed, 0 insertions, 0 deletions