Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107921
b: refs/heads/master
c: 1ac0ae0
h: refs/heads/master
i:
  107919: 0f2d277
v: v3
  • Loading branch information
Denis ChengRq authored and Jens Axboe committed Aug 6, 2008
1 parent f26fe45 commit 2276563
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: ba198efb5ef4e5f4927a18ff95a58f40c58cbaa9
refs/heads/master: 1ac0ae062cecd37587f5b951089f90e1d9d91769
9 changes: 3 additions & 6 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct
*/

bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask);
if (bvl) {
struct biovec_slab *bp = bvec_slabs + *idx;

memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec));
}
if (bvl)
memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec));

return bvl;
}
Expand Down Expand Up @@ -149,7 +146,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
goto out;
}
bio->bi_flags |= idx << BIO_POOL_OFFSET;
bio->bi_max_vecs = bvec_slabs[idx].nr_vecs;
bio->bi_max_vecs = bvec_nr_vecs(idx);
}
bio->bi_io_vec = bvl;
}
Expand Down

0 comments on commit 2276563

Please sign in to comment.