aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2011-11-25 10:51:58 -0500
committerCong Wang <xiyou.wangcong@gmail.com>2012-03-20 09:48:29 -0400
commit589973a7042f5a91a5b8bf78a32c97ae073e2c72 (patch)
tree1cc3f936ac3eca68dddb054bd1b75dc1a2b77a85
parent97d5dd121c3304c65326f1ce9f04f7d0161827bc (diff)
drbd: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
-rw-r--r--drivers/block/drbd/drbd_bitmap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 39de9ff1cfb2..3030201c69d8 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -289,7 +289,7 @@ static unsigned int bm_bit_to_page_idx(struct drbd_bitmap *b, u64 bitnr)
289 return page_nr; 289 return page_nr;
290} 290}
291 291
292static unsigned long *__bm_map_pidx(struct drbd_bitmap *b, unsigned int idx, const enum km_type km) 292static unsigned long *__bm_map_pidx(struct drbd_bitmap *b, unsigned int idx)
293{ 293{
294 struct page *page = b->bm_pages[idx]; 294 struct page *page = b->bm_pages[idx];
295 return (unsigned long *) kmap_atomic(page); 295 return (unsigned long *) kmap_atomic(page);
@@ -551,7 +551,7 @@ static unsigned long bm_count_bits(struct drbd_bitmap *b)
551 } 551 }
552 /* last (or only) page */ 552 /* last (or only) page */
553 last_word = ((b->bm_bits - 1) & BITS_PER_PAGE_MASK) >> LN2_BPL; 553 last_word = ((b->bm_bits - 1) & BITS_PER_PAGE_MASK) >> LN2_BPL;
554 p_addr = __bm_map_pidx(b, idx, KM_USER0); 554 p_addr = __bm_map_pidx(b, idx);
555 for (i = 0; i < last_word; i++) 555 for (i = 0; i < last_word; i++)
556 bits += hweight_long(p_addr[i]); 556 bits += hweight_long(p_addr[i]);
557 p_addr[last_word] &= cpu_to_lel(mask); 557 p_addr[last_word] &= cpu_to_lel(mask);
@@ -559,7 +559,7 @@ static unsigned long bm_count_bits(struct drbd_bitmap *b)
559 /* 32bit arch, may have an unused padding long */ 559 /* 32bit arch, may have an unused padding long */
560 if (BITS_PER_LONG == 32 && (last_word & 1) == 0) 560 if (BITS_PER_LONG == 32 && (last_word & 1) == 0)
561 p_addr[last_word+1] = 0; 561 p_addr[last_word+1] = 0;
562 __bm_unmap(p_addr, KM_USER0); 562 __bm_unmap(p_addr);
563 return bits; 563 return bits;
564} 564}
565 565
@@ -970,11 +970,11 @@ static void bm_page_io_async(struct bm_aio_ctx *ctx, int page_nr, int rw) __must
970 * to use pre-allocated page pool */ 970 * to use pre-allocated page pool */
971 void *src, *dest; 971 void *src, *dest;
972 page = alloc_page(__GFP_HIGHMEM|__GFP_WAIT); 972 page = alloc_page(__GFP_HIGHMEM|__GFP_WAIT);
973 dest = kmap_atomic(page, KM_USER0); 973 dest = kmap_atomic(page);
974 src = kmap_atomic(b->bm_pages[page_nr], KM_USER1); 974 src = kmap_atomic(b->bm_pages[page_nr]);
975 memcpy(dest, src, PAGE_SIZE); 975 memcpy(dest, src, PAGE_SIZE);
976 kunmap_atomic(src, KM_USER1); 976 kunmap_atomic(src);
977 kunmap_atomic(dest, KM_USER0); 977 kunmap_atomic(dest);
978 bm_store_page_idx(page, page_nr); 978 bm_store_page_idx(page, page_nr);
979 } else 979 } else
980 page = b->bm_pages[page_nr]; 980 page = b->bm_pages[page_nr];