diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index e366c745ec18..20dd52a2f92f 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -3864,7 +3864,7 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio) | |||
3864 | struct driver_data *dd = queue->queuedata; | 3864 | struct driver_data *dd = queue->queuedata; |
3865 | struct scatterlist *sg; | 3865 | struct scatterlist *sg; |
3866 | struct bio_vec *bvec; | 3866 | struct bio_vec *bvec; |
3867 | int nents = 0; | 3867 | int i, nents = 0; |
3868 | int tag = 0, unaligned = 0; | 3868 | int tag = 0, unaligned = 0; |
3869 | 3869 | ||
3870 | if (unlikely(dd->dd_flag & MTIP_DDF_STOP_IO)) { | 3870 | if (unlikely(dd->dd_flag & MTIP_DDF_STOP_IO)) { |
@@ -3922,11 +3922,12 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio) | |||
3922 | } | 3922 | } |
3923 | 3923 | ||
3924 | /* Create the scatter list for this bio. */ | 3924 | /* Create the scatter list for this bio. */ |
3925 | bio_for_each_segment(bvec, bio, nents) { | 3925 | bio_for_each_segment(bvec, bio, i) { |
3926 | sg_set_page(&sg[nents], | 3926 | sg_set_page(&sg[nents], |
3927 | bvec->bv_page, | 3927 | bvec->bv_page, |
3928 | bvec->bv_len, | 3928 | bvec->bv_len, |
3929 | bvec->bv_offset); | 3929 | bvec->bv_offset); |
3930 | nents++; | ||
3930 | } | 3931 | } |
3931 | 3932 | ||
3932 | /* Issue the read/write. */ | 3933 | /* Issue the read/write. */ |