mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-22 08:51:30 +03:00
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:
parent
2422c1f3b9
commit
cb1833023f
@ -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;
|
||||
|
||||
@ -139,7 +139,7 @@ static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj);
|
||||
static void *
|
||||
kv_alloc(spl_kmem_cache_t *skc, int size, int flags)
|
||||
{
|
||||
gfp_t lflags = kmem_flags_convert(flags);
|
||||
gfp_t lflags = kmem_flags_convert(flags | KM_VMEM);
|
||||
void *ptr;
|
||||
|
||||
if (skc->skc_flags & KMC_RECLAIMABLE)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user