block: don't use the bvec fast path for dma-buf bios

bio_may_need_split() reads bi_io_vec, which for dma-buf bios aliases
bi_dmabuf_map, and interprets the map as a bvec. Always run the full
split check for dma-buf bios.

Fixes: d88e44f43e ("block: introduce dma map backed bio type")
Signed-off-by: Anuj Gupta <[email protected]>
Reviewed-by: Pavel Begunkov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Anuj Gupta
2026-11-03 07:13:26 -07:00
committed by Jens Axboe
parent e9804489e2
commit 801bddbf1e
+2
View File
@@ -418,6 +418,8 @@ static inline bool bio_may_need_split(struct bio *bio,
if (!bio->bi_io_vec)
return true;
if (op_is_dmabuf(bio->bi_opf))
return true;
bv = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
if (bio->bi_iter.bi_size > bv->bv_len - bio->bi_iter.bi_offset)