From: NeilBrown Though it rarely matters, we should be using 's' rather than r1_bio->sector here. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/md/raid1.c~md-fix-usage-of-wrong-variable-in-raid1 drivers/md/raid1.c --- a/drivers/md/raid1.c~md-fix-usage-of-wrong-variable-in-raid1 +++ a/drivers/md/raid1.c @@ -1145,7 +1145,7 @@ static int end_sync_write(struct bio *bi long sectors_to_go = r1_bio->sectors; /* make sure these bits doesn't get cleared. */ do { - bitmap_end_sync(mddev->bitmap, r1_bio->sector, + bitmap_end_sync(mddev->bitmap, s, &sync_blocks, 1); s += sync_blocks; sectors_to_go -= sync_blocks; _