summaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-05-23 07:35:27 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-23 19:35:31 +0200
commita2eb0c101d24aca9d3d16c30c4f79f3a70c89208 (patch)
treec74aaec429deb174440e76d9b73985abb9604c50 /fs/bio.c
parent[PATCH] md: fix possible oops when starting a raid0 array (diff)
downloadlinux-a2eb0c101d24aca9d3d16c30c4f79f3a70c89208.tar.xz
linux-a2eb0c101d24aca9d3d16c30c4f79f3a70c89208.zip
[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> Cc: "Don Dupuis" <dondster@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--fs/bio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bio.c b/fs/bio.c
index eb8fbc53f2cd..098c12b2d60a 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1116,6 +1116,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;