diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 95fcbbf3d6c9..9567a9c83a1f 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -3881,8 +3881,6 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio) | |||
3881 | raid_bio->bi_next = (void*)rdev; | 3881 | raid_bio->bi_next = (void*)rdev; |
3882 | align_bi->bi_bdev = rdev->bdev; | 3882 | align_bi->bi_bdev = rdev->bdev; |
3883 | align_bi->bi_flags &= ~(1 << BIO_SEG_VALID); | 3883 | align_bi->bi_flags &= ~(1 << BIO_SEG_VALID); |
3884 | /* No reshape active, so we can trust rdev->data_offset */ | ||
3885 | align_bi->bi_sector += rdev->data_offset; | ||
3886 | 3884 | ||
3887 | if (!bio_fits_rdev(align_bi) || | 3885 | if (!bio_fits_rdev(align_bi) || |
3888 | is_badblock(rdev, align_bi->bi_sector, align_bi->bi_size>>9, | 3886 | is_badblock(rdev, align_bi->bi_sector, align_bi->bi_size>>9, |
@@ -3893,6 +3891,9 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio) | |||
3893 | return 0; | 3891 | return 0; |
3894 | } | 3892 | } |
3895 | 3893 | ||
3894 | /* No reshape active, so we can trust rdev->data_offset */ | ||
3895 | align_bi->bi_sector += rdev->data_offset; | ||
3896 | |||
3896 | spin_lock_irq(&conf->device_lock); | 3897 | spin_lock_irq(&conf->device_lock); |
3897 | wait_event_lock_irq(conf->wait_for_stripe, | 3898 | wait_event_lock_irq(conf->wait_for_stripe, |
3898 | conf->quiesce == 0, | 3899 | conf->quiesce == 0, |