]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drbd: use copy_highpage
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 26 Sep 2012 01:33:07 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:41:27 +0000 (15:41 +1000)
Use copy_highpage() to copy from one page to another.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/drbd/drbd_bitmap.c

index d84566496746aef57baf19dae86528bc202038cb..628b31a819ed0737ef3a242de18e0f81ffc0ef5c 100644 (file)
@@ -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];