aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-07-26 21:00:36 -0400
committerNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
commita0a02a7ad62b5615b17294c2075e4916f8d1f0a4 (patch)
treee3f9f7582a869915d3ac8242253c822b61e77e4b /drivers/md/bitmap.c
parentacfe726bdd0000a9be1b308b29fad1e9ae62178c (diff)
md: use proper little-endian bitops
Using __test_and_{set,clear}_bit_le() with ignoring its return value can be replaced with __{set,clear}_bit_le(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: NeilBrown <neilb@suse.de> Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 574b09afedd3..39ff0ef8b76e 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -932,7 +932,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
932 if (bitmap->flags & BITMAP_HOSTENDIAN) 932 if (bitmap->flags & BITMAP_HOSTENDIAN)
933 set_bit(bit, kaddr); 933 set_bit(bit, kaddr);
934 else 934 else
935 __test_and_set_bit_le(bit, kaddr); 935 __set_bit_le(bit, kaddr);
936 kunmap_atomic(kaddr, KM_USER0); 936 kunmap_atomic(kaddr, KM_USER0);
937 PRINTK("set file bit %lu page %lu\n", bit, page->index); 937 PRINTK("set file bit %lu page %lu\n", bit, page->index);
938 } 938 }
@@ -1304,8 +1304,10 @@ void bitmap_daemon_work(mddev_t *mddev)
1304 clear_bit(file_page_offset(bitmap, j), 1304 clear_bit(file_page_offset(bitmap, j),
1305 paddr); 1305 paddr);
1306 else 1306 else
1307 __test_and_clear_bit_le(file_page_offset(bitmap, j), 1307 __clear_bit_le(
1308 paddr); 1308 file_page_offset(bitmap,
1309 j),
1310 paddr);
1309 kunmap_atomic(paddr, KM_USER0); 1311 kunmap_atomic(paddr, KM_USER0);
1310 } else 1312 } else
1311 log->type->clear_region(log, j); 1313 log->type->clear_region(log, j);