From f0524af06cf2243c6bebd7a18fe9876da33b0a08 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 7 Nov 2006 15:25:48 +0100 Subject: [PATCH] [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 Acked-by: Jens Axboe Signed-off-by: Adrian Bunk --- fs/bio.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5