Skip to content

Commit

Permalink
md: use set_bit_le and clear_bit_le
Browse files Browse the repository at this point in the history
The value returned by test_and_set_bit_le() drivers/md/bitmap.c is not used.
So just use set_bit_le(). The same goes for test_and_clear_bit_le().

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: [email protected]
Signed-off-by: NeilBrown <[email protected]>
  • Loading branch information
mita authored and neilbrown committed Apr 24, 2013
1 parent 3ea8929 commit 3f810b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
if (test_bit(BITMAP_HOSTENDIAN, &bitmap->flags))
set_bit(bit, kaddr);
else
test_and_set_bit_le(bit, kaddr);
set_bit_le(bit, kaddr);
kunmap_atomic(kaddr);
pr_debug("set file bit %lu page %lu\n", bit, page->index);
/* record page number so it gets flushed to disk when unplug occurs */
Expand All @@ -868,7 +868,7 @@ static void bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block)
if (test_bit(BITMAP_HOSTENDIAN, &bitmap->flags))
clear_bit(bit, paddr);
else
test_and_clear_bit_le(bit, paddr);
clear_bit_le(bit, paddr);
kunmap_atomic(paddr);
if (!test_page_attr(bitmap, page->index, BITMAP_PAGE_NEEDWRITE)) {
set_page_attr(bitmap, page->index, BITMAP_PAGE_PENDING);
Expand Down

0 comments on commit 3f810b6

Please sign in to comment.