mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 15:40:03 +02:00
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:
parent
4164b1e3d7
commit
5344402f2c
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user