xfs: mark slab-allocated xfs_buf backing memory as __GFP_RECLAIMABLE

xfs_bufs have a shrinker and are therefore reclaimable, as is the memory
backing them. Mark slab-allocated backing memory as __GFP_RECLAIMABLE in
the kmalloc path so that it is accounted properly.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Eric Sandeen 2026-08-21 17:26:39 -05:00 committed by Carlos Maiolino
parent 4164b1e3d7
commit 5344402f2c

View File

@ -176,7 +176,7 @@ xfs_buf_alloc_kmem(
ASSERT(is_power_of_2(size));
ASSERT(size < PAGE_SIZE);
bp->b_addr = kmalloc(size, gfp_mask);
bp->b_addr = kmalloc(size, gfp_mask | __GFP_RECLAIMABLE);
if (!bp->b_addr)
return -ENOMEM;