diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2023-06-25 04:13:23 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 19:12:07 +0200 |
commit | 3fade62b62e84dd8dbf6e92d494b0e7eca750c43 (patch) | |
tree | cc4c51b7a1616a9e3c29a33bca345cfae1452b5b /mm/mm_init.c | |
parent | mm/page_alloc: fix min_free_kbytes calculation regarding ZONE_MOVABLE (diff) | |
download | linux-3fade62b62e84dd8dbf6e92d494b0e7eca750c43.tar.xz linux-3fade62b62e84dd8dbf6e92d494b0e7eca750c43.zip |
mm/mm_init.c: remove obsolete macro HASH_SMALL
HASH_SMALL only works when parameter numentries is 0. But the sole caller
futex_init() never calls alloc_large_system_hash() with numentries set to
0. So HASH_SMALL is obsolete and remove it.
Link: https://lkml.kernel.org/r/20230625021323.849147-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: André Almeida <andrealmeid@igalia.com>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mm_init.c')
-rw-r--r-- | mm/mm_init.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c index d356ba59ef2a..f90db54e2b21 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -2489,15 +2489,7 @@ void *__init alloc_large_system_hash(const char *tablename, else numentries <<= (PAGE_SHIFT - scale); - /* Make sure we've got at least a 0-order allocation.. */ - if (unlikely(flags & HASH_SMALL)) { - /* Makes no sense without HASH_EARLY */ - WARN_ON(!(flags & HASH_EARLY)); - if (!(numentries >> *_hash_shift)) { - numentries = 1UL << *_hash_shift; - BUG_ON(!numentries); - } - } else if (unlikely((numentries * bucketsize) < PAGE_SIZE)) + if (unlikely((numentries * bucketsize) < PAGE_SIZE)) numentries = PAGE_SIZE / bucketsize; } numentries = roundup_pow_of_two(numentries); |