Commit a0763b27bf24f028d8b049ad856b2ee031fb475d
Committed by
Jens Axboe
1 parent
564e559f2b
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
block: handle the null_mapped flag correctly in blk_rq_map_user_iov
The tape drivers (and the sg driver in a special case that doesn't matter here) use the null_mapped flag to tell blk_rq_map_user to not copy around any data into or out of the bounce buffers. blk_rq_map_user_iov never got that treatment, which didn't matter until I refactored blk_rq_map_user to be implemented in terms of blk_rq_map_user_iov. Signed-off-by: Christoph Hellwig <hch@lst.de> Fixes: ddad8dd0a162 ("block: use blk_rq_map_user_iov to implement blk_rq_map_user") Signed-off-by: Jens Axboe <axboe@fb.com>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
block/blk-map.c
... | ... | @@ -93,6 +93,9 @@ |
93 | 93 | if (IS_ERR(bio)) |
94 | 94 | return PTR_ERR(bio); |
95 | 95 | |
96 | + if (map_data && map_data->null_mapped) | |
97 | + bio->bi_flags |= (1 << BIO_NULL_MAPPED); | |
98 | + | |
96 | 99 | if (bio->bi_iter.bi_size != iter->count) { |
97 | 100 | /* |
98 | 101 | * Grab an extra reference to this bio, as bio_unmap_user() |