mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user