Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180164
b: refs/heads/master
c: 1d61658
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Monakhov authored and Jens Axboe committed Jan 28, 2010
1 parent a3a9a92 commit 1f31a51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: c84a301d4a4b1cc382a6549b4e7881ce5b796d63
refs/heads/master: 1d6165851cd8e3f919d446cd6da35dee44e8837e
7 changes: 6 additions & 1 deletion trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,18 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page

if (page == prev->bv_page &&
offset == prev->bv_offset + prev->bv_len) {
unsigned int prev_bv_len = prev->bv_len;
prev->bv_len += len;

if (q->merge_bvec_fn) {
struct bvec_merge_data bvm = {
/* prev_bvec is already charged in
bi_size, discharge it in order to
simulate merging updated prev_bvec
as new bvec. */
.bi_bdev = bio->bi_bdev,
.bi_sector = bio->bi_sector,
.bi_size = bio->bi_size,
.bi_size = bio->bi_size - prev_bv_len,
.bi_rw = bio->bi_rw,
};

Expand Down

0 comments on commit 1f31a51

Please sign in to comment.