summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-11-07 15:25:48 +0100
committerAdrian Bunk <bunk@stusta.de>2006-11-07 15:25:48 +0100
commitf0524af06cf2243c6bebd7a18fe9876da33b0a08 (patch)
tree38bf4c7d46300b2b9267994e08ef49c64657a510 /fs
parent6f5bccdd4fcebf5edc3cd3ff3e68417a0dbe9f2b (diff)
[PATCH] md: Make sure bi_max_vecs is set properly in bio_split
Else a subsequent bio_clone might make a mess. Signed-off-by: Neil Brown <neilb@suse.de> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/bio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 7215911464e4..0cba08f314ca 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1115,6 +1115,9 @@ struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors)
bp->bio1.bi_io_vec = &bp->bv1;
bp->bio2.bi_io_vec = &bp->bv2;
+ bp->bio1.bi_max_vecs = 1;
+ bp->bio2.bi_max_vecs = 1;
+
bp->bio1.bi_end_io = bio_pair_end_1;
bp->bio2.bi_end_io = bio_pair_end_2;