Message ID | 20210608160603.1535935-13-hch@lst.de (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [01/16] mm: use kmap_local_page in memzero_page | expand |
Related | show |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (c53db722ec7ab3ebf29ecf61e922820f31e5284b) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 26 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On 6/8/21 09:08, Christoph Hellwig wrote: > Use memcpy_to_bvec instead of opencoding the logic. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks good. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
diff --git a/block/bounce.c b/block/bounce.c index 94081e013c58..a2fc6326b6c9 100644 --- a/block/bounce.c +++ b/block/bounce.c @@ -67,18 +67,6 @@ static __init int init_emergency_pool(void) __initcall(init_emergency_pool); -/* - * highmem version, map in to vec - */ -static void bounce_copy_vec(struct bio_vec *to, unsigned char *vfrom) -{ - unsigned char *vto; - - vto = kmap_atomic(to->bv_page); - memcpy(vto + to->bv_offset, vfrom, to->bv_len); - kunmap_atomic(vto); -} - /* * Simple bounce buffer support for highmem pages. Depending on the * queue gfp mask set, *to may or may not be a highmem page. kmap it @@ -107,7 +95,7 @@ static void copy_to_high_bio_irq(struct bio *to, struct bio *from) vfrom = page_address(fromvec.bv_page) + tovec.bv_offset; - bounce_copy_vec(&tovec, vfrom); + memcpy_to_bvec(&tovec, vfrom); flush_dcache_page(tovec.bv_page); } bio_advance_iter(from, &from_iter, tovec.bv_len);
Use memcpy_to_bvec instead of opencoding the logic. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/bounce.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)