aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-07 18:13:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-07 18:13:30 -0700
commit8e43e12d638f732fa32600c324711f4be8fe0b1d (patch)
treea0e545bebea11b3ce08147d2e36f2acb1a13de1d /fs
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')
-rw-r--r--fs/bio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 25f1af0d81e..8000e2fa16c 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
*/
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;
}
@@ -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;
}