Commit 1e09d11c authored by Jens Axboe's avatar Jens Axboe

[PATCH] xfs, use bio_add_page()

XFS now needs to use bio_add_page() as not to build bio's of the wrong
size. Also makes the bio build nicer.
parent 08435553
......@@ -1453,7 +1453,6 @@ pagebuf_iorequest( /* start real I/O */
bio = bio_alloc(GFP_NOIO, nr_pages);
BUG_ON(bio == NULL);
bio_init(bio);
bio->bi_bdev = pb->pb_target->pbr_bdev;
bio->bi_sector = sector;
bio->bi_end_io = bio_end_io_pagebuf;
......@@ -1467,12 +1466,8 @@ pagebuf_iorequest( /* start real I/O */
if (nbytes > size)
nbytes = size;
bio->bi_vcnt++;
bio->bi_size += nbytes;
bvec->bv_page = pb->pb_pages[map_i];
bvec->bv_len = nbytes;
bvec->bv_offset = offset;
if (bio_add_page(bio, pb->pb_pages[map_i], nbytes, offset))
break;
offset = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment