kmem: don't pass __GFP_HIGHMEM to __vmalloc

Since Linux 4.12 (torvalds/linux@19809c2da2) __GFP_HIGHMEM has been
automatically added to calls to __vmalloc() internally, so we don't need
it anymore. This is good, because since 6.19 the kernel warns if you use
__GFP_HIGHMEM.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #18053
This commit is contained in:
Rob Norris 2025-12-17 21:21:40 +11:00 committed by Brian Behlendorf
parent 3c8665cb5d
commit f95e306266
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
if (skc->skc_flags & KMC_RECLAIMABLE)
lflags |= __GFP_RECLAIMABLE;
ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
ptr = spl_vmalloc(size, lflags);
/* Resulting allocated memory will be page aligned */
ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE));

View File

@ -188,7 +188,7 @@ spl_kvmalloc(size_t size, gfp_t lflags)
return (ptr);
}
return (spl_vmalloc(size, lflags | __GFP_HIGHMEM));
return (spl_vmalloc(size, lflags));
}
/*
@ -237,7 +237,7 @@ spl_kmem_alloc_impl(size_t size, int flags, int node)
*/
if (size > spl_kmem_alloc_max) {
if (flags & KM_VMEM) {
ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM);
ptr = spl_vmalloc(size, lflags);
} else {
return (NULL);
}