summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-03-03 14:18:57 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-04 22:29:20 +0300
commitb7ab4611b6c793100197abc93e069d6f9aab7960 (patch)
treed9d4d7fc116489fa9c5307baaeeabf936a0de962 /drivers
parent143a70b8b4300faa92ad82468f65dccd440e7957 (diff)
downloadlinux-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.c4
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;
}
}