diff options
author | Christoph Hellwig <hch@lst.de> | 2024-07-02 17:10:22 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-07-03 10:21:16 -0600 |
commit | f8924374fd37a8b41d554acd8b7407af7d354c0d (patch) | |
tree | c2dae00ec947121849defabe69d9b54300d444ff /block/blk-map.c | |
parent | bf4c89fc8797f5c0964a0c3d561fbe7e8483b62f (diff) |
block: call bio_integrity_unmap_free_user from blk_rq_unmap_user
blk_rq_unmap_user always unmaps user space pass-through request. If such
a request has integrity data attached it must come from a user mapping
as well. Call bio_integrity_unmap_free_user from blk_rq_unmap_user
and remove the nvme_unmap_bio wrapper in the nvme driver.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240702151047.1746127-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r-- | block/blk-map.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-map.c b/block/blk-map.c index bce144091128..df5f82d11472 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -757,6 +757,9 @@ int blk_rq_unmap_user(struct bio *bio) bio_release_pages(bio, bio_data_dir(bio) == READ); } + if (bio_integrity(bio)) + bio_integrity_unmap_free_user(bio); + next_bio = bio; bio = bio->bi_next; blk_mq_map_bio_put(next_bio); |