diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-01-09 07:07:47 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-11 12:55:41 -0700 |
| commit | 3d939695e68218d420be2b5dbb2fa39ccb7e97ed (patch) | |
| tree | b9920c53912a19ff9b3e7ff31da484b3036c3d36 /fs/buffer.c | |
| parent | 2f655dcb2d925b55deb8c1ec8f42b522c6bc5698 (diff) | |
blk-crypto: use mempool_alloc_bulk for encrypted bio page allocation
Calling mempool_alloc in a loop is not safe unless the maximum allocation
size times the maximum number of threads using it is less than the
minimum pool size. Use the new mempool_alloc_bulk helper to allocate
all missing elements in one pass to remove this deadlock risk. This
also means that non-pool allocations now use alloc_pages_bulk which can
be significantly faster than a loop over individual page allocations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/buffer.c')
0 files changed, 0 insertions, 0 deletions
