aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/raid1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 7aa958ed2847..d2361b162de5 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2502,7 +2502,10 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp
2502 /* There is nowhere to write, so all non-sync 2502 /* There is nowhere to write, so all non-sync
2503 * drives must be failed - so we are finished 2503 * drives must be failed - so we are finished
2504 */ 2504 */
2505 sector_t rv = max_sector - sector_nr; 2505 sector_t rv;
2506 if (min_bad > 0)
2507 max_sector = sector_nr + min_bad;
2508 rv = max_sector - sector_nr;
2506 *skipped = 1; 2509 *skipped = 1;
2507 put_buf(r1_bio); 2510 put_buf(r1_bio);
2508 return rv; 2511 return rv;