md: use proper little-endian bitops
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 27 Jul 2011 01:00:36 +0000 (11:00 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 27 Jul 2011 01:00:36 +0000 (11:00 +1000)
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>
drivers/md/bitmap.c

index 574b09afedd32ff1f8f30ddefab722fb01edd17d..39ff0ef8b76e786e2ff44826e97fa0bbc5432d5d 100644 (file)
@@ -932,7 +932,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
                if (bitmap->flags & BITMAP_HOSTENDIAN)
                        set_bit(bit, kaddr);
                else
-                       __test_and_set_bit_le(bit, kaddr);
+                       __set_bit_le(bit, kaddr);
                kunmap_atomic(kaddr, KM_USER0);
                PRINTK("set file bit %lu page %lu\n", bit, page->index);
        }
@@ -1304,8 +1304,10 @@ void bitmap_daemon_work(mddev_t *mddev)
                                                clear_bit(file_page_offset(bitmap, j),
                                                          paddr);
                                        else
-                                               __test_and_clear_bit_le(file_page_offset(bitmap, j),
-                                                              paddr);
+                                               __clear_bit_le(
+                                                       file_page_offset(bitmap,
+                                                                        j),
+                                                       paddr);
                                        kunmap_atomic(paddr, KM_USER0);
                                } else
                                        log->type->clear_region(log, j);