Skip to content

Commit

Permalink
[PATCH] md: Make sure bi_max_vecs is set properly in bio_split
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed May 23, 2006
1 parent 5c4c333 commit a2eb0c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a2eb0c1

Please sign in to comment.