Commit a0a02a7a authored by Akinobu Mita's avatar Akinobu Mita Committed by NeilBrown

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent acfe726b
...@@ -932,7 +932,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) ...@@ -932,7 +932,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
if (bitmap->flags & BITMAP_HOSTENDIAN) if (bitmap->flags & BITMAP_HOSTENDIAN)
set_bit(bit, kaddr); set_bit(bit, kaddr);
else else
__test_and_set_bit_le(bit, kaddr); __set_bit_le(bit, kaddr);
kunmap_atomic(kaddr, KM_USER0); kunmap_atomic(kaddr, KM_USER0);
PRINTK("set file bit %lu page %lu\n", bit, page->index); PRINTK("set file bit %lu page %lu\n", bit, page->index);
} }
...@@ -1304,7 +1304,9 @@ void bitmap_daemon_work(mddev_t *mddev) ...@@ -1304,7 +1304,9 @@ void bitmap_daemon_work(mddev_t *mddev)
clear_bit(file_page_offset(bitmap, j), clear_bit(file_page_offset(bitmap, j),
paddr); paddr);
else else
__test_and_clear_bit_le(file_page_offset(bitmap, j), __clear_bit_le(
file_page_offset(bitmap,
j),
paddr); paddr);
kunmap_atomic(paddr, KM_USER0); kunmap_atomic(paddr, KM_USER0);
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment