diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-03 12:18:56 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-04 20:29:20 +0100 |
commit | 143a70b8b4300faa92ad82468f65dccd440e7957 (patch) | |
tree | d79c492462b6f4e1ba78a4087ff9dd9dd8194733 /arch/xtensa | |
parent | Merge tag 'nvme-5.18-2022-03-03' of git://git.infradead.org/nvme into for-5.1... (diff) | |
download | linux-143a70b8b4300faa92ad82468f65dccd440e7957.tar.xz linux-143a70b8b4300faa92ad82468f65dccd440e7957.zip |
iss-simdisk: use bvec_kmap_local in simdisk_submit_bio
Using local kmaps slightly reduces the chances to stray writes, and
the bvec interface cleans up the code a little bit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Link: https://lore.kernel.org/r/20220303111905.321089-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/platforms/iss/simdisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c index 8eb6ad1a3a1d..0f0e0724397f 100644 --- a/arch/xtensa/platforms/iss/simdisk.c +++ b/arch/xtensa/platforms/iss/simdisk.c @@ -108,13 +108,13 @@ static void simdisk_submit_bio(struct bio *bio) sector_t sector = bio->bi_iter.bi_sector; bio_for_each_segment(bvec, bio, iter) { - char *buffer = kmap_atomic(bvec.bv_page) + bvec.bv_offset; + char *buffer = bvec_kmap_local(&bvec); unsigned len = bvec.bv_len >> SECTOR_SHIFT; simdisk_transfer(dev, sector, len, buffer, bio_data_dir(bio) == WRITE); sector += len; - kunmap_atomic(buffer); + kunmap_local(buffer); } bio_endio(bio); |