diff options
-rw-r--r-- | include/linux/bvec.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 3bc91879e1e2..ff13cbc1887d 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h | |||
@@ -160,8 +160,9 @@ static inline void bvec_advance(const struct bio_vec *bvec, | |||
160 | bv->bv_page = nth_page(bv->bv_page, 1); | 160 | bv->bv_page = nth_page(bv->bv_page, 1); |
161 | bv->bv_offset = 0; | 161 | bv->bv_offset = 0; |
162 | } else { | 162 | } else { |
163 | bv->bv_page = bvec->bv_page; | 163 | bv->bv_page = bvec_nth_page(bvec->bv_page, bvec->bv_offset / |
164 | bv->bv_offset = bvec->bv_offset; | 164 | PAGE_SIZE); |
165 | bv->bv_offset = bvec->bv_offset & ~PAGE_MASK; | ||
165 | } | 166 | } |
166 | bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset, | 167 | bv->bv_len = min_t(unsigned int, PAGE_SIZE - bv->bv_offset, |
167 | bvec->bv_len - iter_all->done); | 168 | bvec->bv_len - iter_all->done); |