mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-10 20:36:21 +03:00
kmem: don't add __GFP_RECLAIMABLE for KM_VMEM allocations
vmalloc()'d memory is not movable/reclaimable, so __GFP_RECLAIMABLE is not a valid flag, and since 6.19 the kernel warns if you use it. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #18107
This commit is contained in:
parent
dbb3f247ed
commit
a1319bf654
@ -142,8 +142,6 @@ kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
|
||||
gfp_t lflags = kmem_flags_convert(flags | KM_VMEM);
|
||||
void *ptr;
|
||||
|
||||
if (skc->skc_flags & KMC_RECLAIMABLE)
|
||||
lflags |= __GFP_RECLAIMABLE;
|
||||
ptr = spl_vmalloc(size, lflags);
|
||||
|
||||
/* Resulting allocated memory will be page aligned */
|
||||
@ -424,7 +422,7 @@ spl_emergency_alloc(spl_kmem_cache_t *skc, int flags, void **obj)
|
||||
if (!empty)
|
||||
return (-EEXIST);
|
||||
|
||||
if (skc->skc_flags & KMC_RECLAIMABLE)
|
||||
if (skc->skc_flags & KMC_RECLAIMABLE && !(flags & KM_VMEM))
|
||||
lflags |= __GFP_RECLAIMABLE;
|
||||
ske = kmalloc(sizeof (*ske), lflags);
|
||||
if (ske == NULL)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user