Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109189
b: refs/heads/master
c: aefcc28
h: refs/heads/master
i:
  109187: f18e854
v: v3
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 27, 2008
1 parent 24fb18e commit 8dc1d78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76029ff37f31dad64641489c610d98955217bb68
refs/heads/master: aefcc28a3a63ac33a298777aa50ba43641c75241
10 changes: 5 additions & 5 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@ static struct bio_map_data *bio_alloc_map_data(int nr_segs, int iov_count,
return NULL;
}

static int __bio_copy_iov(struct bio *bio, struct sg_iovec *iov, int iov_count,
int uncopy)
static int __bio_copy_iov(struct bio *bio, struct bio_vec *iovecs,
struct sg_iovec *iov, int iov_count, int uncopy)
{
int ret = 0, i;
struct bio_vec *bvec;
Expand All @@ -503,7 +503,7 @@ static int __bio_copy_iov(struct bio *bio, struct sg_iovec *iov, int iov_count,

__bio_for_each_segment(bvec, bio, i, 0) {
char *bv_addr = page_address(bvec->bv_page);
unsigned int bv_len = bvec->bv_len;
unsigned int bv_len = iovecs[i].bv_len;

while (bv_len && iov_idx < iov_count) {
unsigned int bytes;
Expand Down Expand Up @@ -555,7 +555,7 @@ int bio_uncopy_user(struct bio *bio)
struct bio_map_data *bmd = bio->bi_private;
int ret;

ret = __bio_copy_iov(bio, bmd->sgvecs, bmd->nr_sgvecs, 1);
ret = __bio_copy_iov(bio, bmd->iovecs, bmd->sgvecs, bmd->nr_sgvecs, 1);

bio_free_map_data(bmd);
bio_put(bio);
Expand Down Expand Up @@ -634,7 +634,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q, struct sg_iovec *iov,
* success
*/
if (!write_to_vm) {
ret = __bio_copy_iov(bio, iov, iov_count, 0);
ret = __bio_copy_iov(bio, bio->bi_io_vec, iov, iov_count, 0);
if (ret)
goto cleanup;
}
Expand Down

0 comments on commit 8dc1d78

Please sign in to comment.