diff options
| -rw-r--r-- | fs/bio.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -492,8 +492,8 @@ static struct bio_map_data *bio_alloc_map_data(int nr_segs, int iov_count, | |||
| 492 | return NULL; | 492 | return NULL; |
| 493 | } | 493 | } |
| 494 | 494 | ||
| 495 | static int __bio_copy_iov(struct bio *bio, struct sg_iovec *iov, int iov_count, | 495 | static int __bio_copy_iov(struct bio *bio, struct bio_vec *iovecs, |
| 496 | int uncopy) | 496 | struct sg_iovec *iov, int iov_count, int uncopy) |
| 497 | { | 497 | { |
| 498 | int ret = 0, i; | 498 | int ret = 0, i; |
| 499 | struct bio_vec *bvec; | 499 | struct bio_vec *bvec; |
| @@ -503,7 +503,7 @@ static int __bio_copy_iov(struct bio *bio, struct sg_iovec *iov, int iov_count, | |||
| 503 | 503 | ||
| 504 | __bio_for_each_segment(bvec, bio, i, 0) { | 504 | __bio_for_each_segment(bvec, bio, i, 0) { |
| 505 | char *bv_addr = page_address(bvec->bv_page); | 505 | char *bv_addr = page_address(bvec->bv_page); |
| 506 | unsigned int bv_len = bvec->bv_len; | 506 | unsigned int bv_len = iovecs[i].bv_len; |
| 507 | 507 | ||
| 508 | while (bv_len && iov_idx < iov_count) { | 508 | while (bv_len && iov_idx < iov_count) { |
| 509 | unsigned int bytes; | 509 | unsigned int bytes; |
| @@ -555,7 +555,7 @@ int bio_uncopy_user(struct bio *bio) | |||
| 555 | struct bio_map_data *bmd = bio->bi_private; | 555 | struct bio_map_data *bmd = bio->bi_private; |
| 556 | int ret; | 556 | int ret; |
| 557 | 557 | ||
| 558 | ret = __bio_copy_iov(bio, bmd->sgvecs, bmd->nr_sgvecs, 1); | 558 | ret = __bio_copy_iov(bio, bmd->iovecs, bmd->sgvecs, bmd->nr_sgvecs, 1); |
| 559 | 559 | ||
| 560 | bio_free_map_data(bmd); | 560 | bio_free_map_data(bmd); |
| 561 | bio_put(bio); | 561 | bio_put(bio); |
| @@ -634,7 +634,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q, struct sg_iovec *iov, | |||
| 634 | * success | 634 | * success |
| 635 | */ | 635 | */ |
| 636 | if (!write_to_vm) { | 636 | if (!write_to_vm) { |
| 637 | ret = __bio_copy_iov(bio, iov, iov_count, 0); | 637 | ret = __bio_copy_iov(bio, bio->bi_io_vec, iov, iov_count, 0); |
| 638 | if (ret) | 638 | if (ret) |
| 639 | goto cleanup; | 639 | goto cleanup; |
| 640 | } | 640 | } |
