diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-03 14:18:57 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-04 22:29:20 +0300 |
commit | b7ab4611b6c793100197abc93e069d6f9aab7960 (patch) | |
tree | d9d4d7fc116489fa9c5307baaeeabf936a0de962 /drivers | |
parent | 143a70b8b4300faa92ad82468f65dccd440e7957 (diff) | |
download | linux-b7ab4611b6c793100197abc93e069d6f9aab7960.tar.xz |
aoe: use bvec_kmap_local in bvcpy
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>
Link: https://lore.kernel.org/r/20220303111905.321089-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index cc11f89a0928..384073ef2323 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -1018,9 +1018,9 @@ bvcpy(struct sk_buff *skb, struct bio *bio, struct bvec_iter iter, long cnt) iter.bi_size = cnt; __bio_for_each_segment(bv, bio, iter, iter) { - char *p = kmap_atomic(bv.bv_page) + bv.bv_offset; + char *p = bvec_kmap_local(&bv); skb_copy_bits(skb, soff, p, bv.bv_len); - kunmap_atomic(p); + kunmap_local(p); soff += bv.bv_len; } } |