kmem: don't add __GFP_COMP for KM_VMEM allocations

It hasn't been necessary since Linux 3.13
(torvalds/linux@a57a49887e), and since 6.19 the kernel warns if you
use it.

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 22:12:05 +11:00
committed by Brian Behlendorf
parent f95e306266
commit f041375b52
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -66,7 +66,10 @@ void *spl_kvmalloc(size_t size, gfp_t flags);
static inline gfp_t
kmem_flags_convert(int flags)
{
gfp_t lflags = __GFP_NOWARN | __GFP_COMP;
gfp_t lflags = __GFP_NOWARN;
if (!(flags & KM_VMEM))
lflags |= __GFP_COMP;
if (flags & KM_NOSLEEP) {
lflags |= GFP_ATOMIC | __GFP_NORETRY;