aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-07 21:13:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-07 21:13:30 -0400
commit8e43e12d638f732fa32600c324711f4be8fe0b1d (patch)
treea0e545bebea11b3ce08147d2e36f2acb1a13de1d /fs/bio.c
parent01b09b6c605ed119fba75b82582f017e44dd4a55 (diff)
parent62aa0054da220b8bbe6f23c0eb1d97a99005d0b3 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: xen-blkfront.c: make blkif_ioctl() static bio: make use of bvec_nr_vecs cciss: fix bug if scsi tape support is disabled cciss: add support for multi lun tape devices cciss: change the way we notify scsi midlayer of tape drives cciss: fix negative logical drive count in procfs cciss: remove redundant code cciss: make rebuild_lun_table behave better cciss: return -EFAULT if copy_from_user() fails
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 25f1af0d81e5..8000e2fa16cb 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -77,11 +77,8 @@ struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct
77 */ 77 */
78 78
79 bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask); 79 bvl = mempool_alloc(bs->bvec_pools[*idx], gfp_mask);
80 if (bvl) { 80 if (bvl)
81 struct biovec_slab *bp = bvec_slabs + *idx; 81 memset(bvl, 0, bvec_nr_vecs(*idx) * sizeof(struct bio_vec));
82
83 memset(bvl, 0, bp->nr_vecs * sizeof(struct bio_vec));
84 }
85 82
86 return bvl; 83 return bvl;
87} 84}
@@ -149,7 +146,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
149 goto out; 146 goto out;
150 } 147 }
151 bio->bi_flags |= idx << BIO_POOL_OFFSET; 148 bio->bi_flags |= idx << BIO_POOL_OFFSET;
152 bio->bi_max_vecs = bvec_slabs[idx].nr_vecs; 149 bio->bi_max_vecs = bvec_nr_vecs(idx);
153 } 150 }
154 bio->bi_io_vec = bvl; 151 bio->bi_io_vec = bvl;
155 } 152 }