]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: use get_oder() and check size is is_power_of_2
authorBarry Song <v-songbaohua@oppo.com>
Wed, 14 Aug 2024 22:34:16 +0000 (10:34 +1200)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:53:23 +0000 (17:53 -0700)
commit8bfb09a8be669eac93ea0149b897ce32d4e2dcd7
treee0537a979b403ce4789d4ccdfa81721ca2fbc2d9
parent692e470179fe4d420bfaefad40ad066ace2da642
mm: use get_oder() and check size is is_power_of_2

Using get_order() is more robust according to Baolin.  It is also better
to filter illegal size such as 3KB, 16KB according to David.

Link: https://lkml.kernel.org/r/20240814224635.43272-1-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Suggested-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c