Guys... in my email... the code really breaks up bad... is there a version of the code without any line-breaks????<br><br><div class="gmail_quote">On Fri, Feb 10, 2012 at 2:40 PM, Cong Wang <span dir="ltr"><<a href="mailto:amwang@redhat.com">amwang@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Cong Wang <<a href="mailto:amwang@redhat.com">amwang@redhat.com</a>><br>
---<br>
drivers/block/drbd/drbd_bitmap.c | 14 +++++++-------<br>
1 files changed, 7 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c<br>
index 39de9ff..3030201 100644<br>
--- a/drivers/block/drbd/drbd_bitmap.c<br>
+++ b/drivers/block/drbd/drbd_bitmap.c<br>
@@ -289,7 +289,7 @@ static unsigned int bm_bit_to_page_idx(struct drbd_bitmap *b, u64 bitnr)<br>
return page_nr;<br>
}<br>
<br>
-static unsigned long *__bm_map_pidx(struct drbd_bitmap *b, unsigned int idx, const enum km_type km)<br>
+static unsigned long *__bm_map_pidx(struct drbd_bitmap *b, unsigned int idx)<br>
{<br>
struct page *page = b->bm_pages[idx];<br>
return (unsigned long *) kmap_atomic(page);<br>
@@ -551,7 +551,7 @@ static unsigned long bm_count_bits(struct drbd_bitmap *b)<br>
}<br>
/* last (or only) page */<br>
last_word = ((b->bm_bits - 1) & BITS_PER_PAGE_MASK) >> LN2_BPL;<br>
- p_addr = __bm_map_pidx(b, idx, KM_USER0);<br>
+ p_addr = __bm_map_pidx(b, idx);<br>
for (i = 0; i < last_word; i++)<br>
bits += hweight_long(p_addr[i]);<br>
p_addr[last_word] &= cpu_to_lel(mask);<br>
@@ -559,7 +559,7 @@ static unsigned long bm_count_bits(struct drbd_bitmap *b)<br>
/* 32bit arch, may have an unused padding long */<br>
if (BITS_PER_LONG == 32 && (last_word & 1) == 0)<br>
p_addr[last_word+1] = 0;<br>
- __bm_unmap(p_addr, KM_USER0);<br>
+ __bm_unmap(p_addr);<br>
return bits;<br>
}<br>
<br>
@@ -970,11 +970,11 @@ static void bm_page_io_async(struct bm_aio_ctx *ctx, int page_nr, int rw) __must<br>
* to use pre-allocated page pool */<br>
void *src, *dest;<br>
page = alloc_page(__GFP_HIGHMEM|__GFP_WAIT);<br>
- dest = kmap_atomic(page, KM_USER0);<br>
- src = kmap_atomic(b->bm_pages[page_nr], KM_USER1);<br>
+ dest = kmap_atomic(page);<br>
+ src = kmap_atomic(b->bm_pages[page_nr]);<br>
memcpy(dest, src, PAGE_SIZE);<br>
- kunmap_atomic(src, KM_USER1);<br>
- kunmap_atomic(dest, KM_USER0);<br>
+ kunmap_atomic(src);<br>
+ kunmap_atomic(dest);<br>
bm_store_page_idx(page, page_nr);<br>
} else<br>
page = b->bm_pages[page_nr];<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.6<br><br></font></span></blockquote></div><div><br></div>-- <div>Robert Q Kim<br>eBook Programmer and iBooks Consultant <br><a href="http://www.youtube.com/watch?v=INXa_eTlHWk">http://www.youtube.com/watch?v=INXa_eTlHWk</a> <br>
2611 S Coast Highway<br>San Diego, CA 92007<br>310 598 1606
</div>