brd: use memcpy_{to,from]_page in brd_rw_bvec
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Apr 2025 14:09:51 +0000 (07:09 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Apr 2025 17:45:41 +0000 (11:45 -0600)
commit53ec1abce79c986dc59e59d0c60d00088bcdf32a
tree69586922e0faf07769e2f88b82aac7902426cce9
parent3185444f0504ca8ff54e2a7275f1ff60a6a6cf0c
brd: use memcpy_{to,from]_page in brd_rw_bvec

Use the proper helpers to copy to/from potential highmem pages, which
do a local instead of atomic kmap underneath, and perform
flush_dcache_page where needed.  This also simplifies the code so much
that the separate read write helpers are not required any more.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20250428141014.2360063-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/brd.c