diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-06-24 10:00:02 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-06-24 06:53:25 -0600 |
| commit | e7c1627afda2484baf65449be15873c2550f917a (patch) | |
| tree | 5b5fcad6bff1278a922ce86dda853b3d048a4829 /include/linux/errqueue.h | |
| parent | 3ca4f4e3ae811d414076a491cbf0dfcdae0dc01e (diff) | |
block: fix GFP_ flags confusion in bio_integrity_alloc_buf
bio_integrity_alloc_buf usage of GFP_ flags is messed up. For one it
mixes GFP_NOFS and GFP_NOIO for neighbouring allocations, but it also
makes the allocations fail more often than needed. That code was copied
from bio_alloc_bioset which needs to do that so that it can punt to the
rescuer workqueue, but none of that is needed for the integrity
allocations that either sits in the file system or at the very bottom
of the I/O stack. Failing early means we'll do a fully waiting
allocation from the mempool ->alloc callback which is usually much
larger than required.
Fix this by passing a gfp_t so that the file system path can pass
GFP_NOFS and the auto-integrity code can pass GFP_NOIO, and don't
modify the allocation type except for disabling warnings.
Fixes: ec7f31b2a2d3 ("block: make bio auto-integrity deadlock safe")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://patch.msgid.link/20260624080014.1998650-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
