aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 886a9d865488..378a25894c57 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1781,7 +1781,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1781 1781
1782 /* take from bio_init */ 1782 /* take from bio_init */
1783 bio->bi_next = NULL; 1783 bio->bi_next = NULL;
1784 bio->bi_flags &= ~(BIO_POOL_MASK-1);
1784 bio->bi_flags |= 1 << BIO_UPTODATE; 1785 bio->bi_flags |= 1 << BIO_UPTODATE;
1786 bio->bi_comp_cpu = -1;
1785 bio->bi_rw = READ; 1787 bio->bi_rw = READ;
1786 bio->bi_vcnt = 0; 1788 bio->bi_vcnt = 0;
1787 bio->bi_idx = 0; 1789 bio->bi_idx = 0;
@@ -1854,7 +1856,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1854 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) 1856 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
1855 break; 1857 break;
1856 BUG_ON(sync_blocks < (PAGE_SIZE>>9)); 1858 BUG_ON(sync_blocks < (PAGE_SIZE>>9));
1857 if (len > (sync_blocks<<9)) 1859 if ((len >> 9) > sync_blocks)
1858 len = sync_blocks<<9; 1860 len = sync_blocks<<9;
1859 } 1861 }
1860 1862