mm/slub: fix MAX_ORDER usage in calculate_order()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 15 Mar 2023 11:31:31 +0000 (14:31 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 02:42:46 +0000 (19:42 -0700)
commit7a16d7c7619b26e5e9bfc1360de0d02a94f7d9eb
treea4f67bcc5d47d575a4f27dd988712697363a8d2b
parent668a89907c6b908c4a72ef22e70bbc95efca2000
mm/slub: fix MAX_ORDER usage in calculate_order()

MAX_ORDER is not inclusive: the maximum allocation order buddy allocator
can deliver is MAX_ORDER-1.

Fix MAX_ORDER usage in calculate_order().

Link: https://lkml.kernel.org/r/20230315113133.11326-9-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slub.c