diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index e0b8d0dd7a87..ae7c15207df5 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1767,6 +1767,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1767 | return rv; | 1767 | return rv; |
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | if (max_sector > mddev->resync_max) | ||
1771 | max_sector = mddev->resync_max; /* Don't do IO beyond here */ | ||
1770 | nr_sectors = 0; | 1772 | nr_sectors = 0; |
1771 | sync_blocks = 0; | 1773 | sync_blocks = 0; |
1772 | do { | 1774 | do { |