From be9293406e44591b421de18db975ffbe878622e6 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 25 Oct 2012 12:14:45 +1100 Subject: [PATCH] drbd: use copy_highpage Use copy_highpage() to copy from one page to another. Signed-off-by: Akinobu Mita Cc: Lars Ellenberg Signed-off-by: Andrew Morton --- drivers/block/drbd/drbd_bitmap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index d84566496746..628b31a819ed 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c @@ -977,13 +977,8 @@ static void bm_page_io_async(struct bm_aio_ctx *ctx, int page_nr, int rw) __must bm_set_page_unchanged(b->bm_pages[page_nr]); if (ctx->flags & BM_AIO_COPY_PAGES) { - void *src, *dest; page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_WAIT); - dest = kmap_atomic(page); - src = kmap_atomic(b->bm_pages[page_nr]); - memcpy(dest, src, PAGE_SIZE); - kunmap_atomic(src); - kunmap_atomic(dest); + copy_highpage(page, b->bm_pages[page_nr]); bm_store_page_idx(page, page_nr); } else page = b->bm_pages[page_nr]; -- 2.39.5