lkml.org 
[lkml]   [2011]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH resend 3/6] md: use proper little-endian bitops
On Sun, 26 Jun 2011 14:57:53 +0900 Akinobu Mita <akinobu.mita@gmail.com>
wrote:

> 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
> ---
> drivers/md/bitmap.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 574b09a..870a7fc 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)
> 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,7 +1304,7 @@ 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),
> + __clear_bit_le(file_page_offset(bitmap, j),
> paddr);
> kunmap_atomic(paddr, KM_USER0);
> } else


Thanks. I've applied this one to my 'md' tree.

NeilBrown


\
 
 \ /
  Last update: 2011-06-28 08:53    [W:0.055 / U:10.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site