projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
143a70b
)
aoe: use bvec_kmap_local in bvcpy
author
Christoph Hellwig
<hch@lst.de>
Thu, 3 Mar 2022 11:18:57 +0000
(14:18 +0300)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 4 Mar 2022 19:29:20 +0000
(12:29 -0700)
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>
drivers/block/aoe/aoecmd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/aoe/aoecmd.c
b/drivers/block/aoe/aoecmd.c
index cc11f89a0928f0373f15d110dd72abf6aac4400c..384073ef2323c9ee1c53bc1fd20b5346da159c25 100644
(file)
--- 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;
}
}