aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-03-23 19:42:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:20 -0400
commit6b33aff368def952be78102c0935ebd219f9a748 (patch)
treed8f06ac51fb13bf34d1fc3791db02761c8662a22 /drivers/md/bitmap.c
parent3cdc7125c364b2baad8aba69c058b26d3dca5f52 (diff)
md: use little-endian bitops
As a preparation for removing ext2 non-atomic bit operations from asm/bitops.h. This converts ext2 non-atomic bit operations to little-endian bit operations. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 9a35320fb59f..a2ce0b2da281 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -854,7 +854,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
854 if (bitmap->flags & BITMAP_HOSTENDIAN) 854 if (bitmap->flags & BITMAP_HOSTENDIAN)
855 set_bit(bit, kaddr); 855 set_bit(bit, kaddr);
856 else 856 else
857 ext2_set_bit(bit, kaddr); 857 __test_and_set_bit_le(bit, kaddr);
858 kunmap_atomic(kaddr, KM_USER0); 858 kunmap_atomic(kaddr, KM_USER0);
859 PRINTK("set file bit %lu page %lu\n", bit, page->index); 859 PRINTK("set file bit %lu page %lu\n", bit, page->index);
860 } 860 }
@@ -1050,7 +1050,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
1050 if (bitmap->flags & BITMAP_HOSTENDIAN) 1050 if (bitmap->flags & BITMAP_HOSTENDIAN)
1051 b = test_bit(bit, paddr); 1051 b = test_bit(bit, paddr);
1052 else 1052 else
1053 b = ext2_test_bit(bit, paddr); 1053 b = test_bit_le(bit, paddr);
1054 kunmap_atomic(paddr, KM_USER0); 1054 kunmap_atomic(paddr, KM_USER0);
1055 if (b) { 1055 if (b) {
1056 /* if the disk bit is set, set the memory bit */ 1056 /* if the disk bit is set, set the memory bit */
@@ -1226,7 +1226,7 @@ void bitmap_daemon_work(mddev_t *mddev)
1226 clear_bit(file_page_offset(bitmap, j), 1226 clear_bit(file_page_offset(bitmap, j),
1227 paddr); 1227 paddr);
1228 else 1228 else
1229 ext2_clear_bit(file_page_offset(bitmap, j), 1229 __test_and_clear_bit_le(file_page_offset(bitmap, j),
1230 paddr); 1230 paddr);
1231 kunmap_atomic(paddr, KM_USER0); 1231 kunmap_atomic(paddr, KM_USER0);
1232 } else 1232 } else