diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-03-24 21:38:59 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-24 21:38:59 -0600 |
commit | 705cd0ea1cde2ce9225f1485c5a32c5841cacc5f (patch) | |
tree | 72bc2c5eded0e04fc5e70ca2bd6df93a2e264112 /fs/direct-io.c | |
parent | c8158819d506a8aedeca53c52dfb709a0aabe011 (diff) | |
parent | 29ed7813ce5c4661261aeebddb1b8660e0860223 (diff) |
Merge branch 'for-jens' of http://evilpiepirate.org/git/linux-bcache into for-3.10/core
This contains Kents prep work for the immutable bio_vecs.
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index f853263cf74f..38484b08a39a 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -441,8 +441,8 @@ static struct bio *dio_await_one(struct dio *dio) static int dio_bio_complete(struct dio *dio, struct bio *bio) { const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); - struct bio_vec *bvec = bio->bi_io_vec; - int page_no; + struct bio_vec *bvec; + unsigned i; if (!uptodate) dio->io_error = -EIO; @@ -450,8 +450,8 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) if (dio->is_async && dio->rw == READ) { bio_check_pages_dirty(bio); /* transfers ownership */ } else { - for (page_no = 0; page_no < bio->bi_vcnt; page_no++) { - struct page *page = bvec[page_no].bv_page; + bio_for_each_segment_all(bvec, bio, i) { + struct page *page = bvec->bv_page; if (dio->rw == READ && !PageCompound(page)) set_page_dirty_lock(page); |