mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-21 22:47:51 -04:00
block: handle huge zero folios in bio_free_folios
When CONFIG_PERSISTENT_HUGE_ZERO_FOLIO is enabled, iomap_dio_zero() can
add a huge zero folio to a zeroing bio, which needs special treatment
in bio_free_folios by also checking is_huge_zero_folio() in addition to
is_zero_folio().
Fixes: 8dd5e7c75d ("block: add helpers to bounce buffer an iov_iter into bios")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260716091306.316625-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
447cfed6d7
commit
4f221efff9
@@ -1311,7 +1311,7 @@ static void bio_free_folios(struct bio *bio)
|
||||
bio_for_each_bvec_all(bv, bio, i) {
|
||||
struct folio *folio = bvec_folio(bv);
|
||||
|
||||
if (!is_zero_folio(folio))
|
||||
if (!is_zero_folio(folio) && !is_huge_zero_folio(folio))
|
||||
folio_put(folio);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user