aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-28 10:42:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-28 10:42:58 -0400
commit7e599e6e62759e057e902fcf9a05ba24f6155bcd (patch)
treec546d89105deaadfe961133fed6fd0b84f66ab6f
parent3a80e52486eff1221ece5902b423da59f263069d (diff)
drbd: fix up merge error
In commit 95a0f10cddbf ("drbd: store in-core bitmap little endian, regardless of architecture") drbd had made the sane choice to use little-endian bitmap functions everywhere. However, it used the horrible old functions names from <asm-generic/bitops/le.h>, that were never really meant to be exported. In the meantime, things got cleaned up, and in commit c4945b9ed472 ("asm-generic: rename generic little-endian bitops functions") we renamed the LE bitops to something sane, exactly so that they could be used in random code without people gouging their eyes out when seeing the crazy jumble of letters that were the old internal names. As a result the drbd thing merged cleanly (commit 8d49a77568d1: "Merge branch 'for-2.6.39/drivers' of git://git.kernel.dk/linux-2.6-block"), since there was no data conflict - but the end result obviously doesn't actually compile. Reported-and-tested-by: Ingo Molnar <mingo@elte.hu> Cc: Jens Axboe <jaxboe@fusionio.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/block/drbd/drbd_bitmap.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index f0ae63d2df65..76210ba401ac 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -29,8 +29,6 @@
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <asm/kmap_types.h> 30#include <asm/kmap_types.h>
31 31
32#include <asm-generic/bitops/le.h>
33
34#include "drbd_int.h" 32#include "drbd_int.h"
35 33
36 34
@@ -1184,10 +1182,10 @@ static unsigned long __bm_find_next(struct drbd_conf *mdev, unsigned long bm_fo,
1184 p_addr = __bm_map_pidx(b, bm_bit_to_page_idx(b, bm_fo), km); 1182 p_addr = __bm_map_pidx(b, bm_bit_to_page_idx(b, bm_fo), km);
1185 1183
1186 if (find_zero_bit) 1184 if (find_zero_bit)
1187 i = generic_find_next_zero_le_bit(p_addr, 1185 i = find_next_zero_bit_le(p_addr,
1188 PAGE_SIZE*8, bm_fo & BITS_PER_PAGE_MASK); 1186 PAGE_SIZE*8, bm_fo & BITS_PER_PAGE_MASK);
1189 else 1187 else
1190 i = generic_find_next_le_bit(p_addr, 1188 i = find_next_bit_le(p_addr,
1191 PAGE_SIZE*8, bm_fo & BITS_PER_PAGE_MASK); 1189 PAGE_SIZE*8, bm_fo & BITS_PER_PAGE_MASK);
1192 1190
1193 __bm_unmap(p_addr, km); 1191 __bm_unmap(p_addr, km);
@@ -1287,9 +1285,9 @@ static int __bm_change_bits_to(struct drbd_conf *mdev, const unsigned long s,
1287 last_page_nr = page_nr; 1285 last_page_nr = page_nr;
1288 } 1286 }
1289 if (val) 1287 if (val)
1290 c += (0 == generic___test_and_set_le_bit(bitnr & BITS_PER_PAGE_MASK, p_addr)); 1288 c += (0 == __test_and_set_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr));
1291 else 1289 else
1292 c -= (0 != generic___test_and_clear_le_bit(bitnr & BITS_PER_PAGE_MASK, p_addr)); 1290 c -= (0 != __test_and_clear_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr));
1293 } 1291 }
1294 if (p_addr) 1292 if (p_addr)
1295 __bm_unmap(p_addr, km); 1293 __bm_unmap(p_addr, km);
@@ -1438,7 +1436,7 @@ int drbd_bm_test_bit(struct drbd_conf *mdev, const unsigned long bitnr)
1438 bm_print_lock_info(mdev); 1436 bm_print_lock_info(mdev);
1439 if (bitnr < b->bm_bits) { 1437 if (bitnr < b->bm_bits) {
1440 p_addr = bm_map_pidx(b, bm_bit_to_page_idx(b, bitnr)); 1438 p_addr = bm_map_pidx(b, bm_bit_to_page_idx(b, bitnr));
1441 i = generic_test_le_bit(bitnr & BITS_PER_PAGE_MASK, p_addr) ? 1 : 0; 1439 i = test_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr) ? 1 : 0;
1442 bm_unmap(p_addr); 1440 bm_unmap(p_addr);
1443 } else if (bitnr == b->bm_bits) { 1441 } else if (bitnr == b->bm_bits) {
1444 i = -1; 1442 i = -1;
@@ -1482,7 +1480,7 @@ int drbd_bm_count_bits(struct drbd_conf *mdev, const unsigned long s, const unsi
1482 ERR_IF (bitnr >= b->bm_bits) { 1480 ERR_IF (bitnr >= b->bm_bits) {
1483 dev_err(DEV, "bitnr=%lu bm_bits=%lu\n", bitnr, b->bm_bits); 1481 dev_err(DEV, "bitnr=%lu bm_bits=%lu\n", bitnr, b->bm_bits);
1484 } else { 1482 } else {
1485 c += (0 != generic_test_le_bit(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr)); 1483 c += (0 != test_bit_le(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr));
1486 } 1484 }
1487 } 1485 }
1488 if (p_addr) 1486 if (p_addr)