diff options
author | Andrew Morton <akpm@osdl.org> | 2005-07-28 04:07:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 11:38:59 -0400 |
commit | a5453be48e8def75a9c1b2177b82fa0e692c6e3a (patch) | |
tree | c1d224f0fb4db22e87567e1eea45001a7b11e51f | |
parent | 577a4f8102d54b504cb22eb021b89e957e8df18f (diff) |
[PATCH] bio_clone fix
Fix bug introduced in 2.6.11-rc2: when we clone a BIO we need to copy over the
current index into it as well.
It corrupts data with some MD setups.
See http://bugzilla.kernel.org/show_bug.cgi?id=4946
Huuuuuuuuge thanks to Matthew Stapleton <matthew4196@gmail.com> for doggedly
chasing this one down.
Acked-by: Jens Axboe <axboe@suse.de>
Cc: <linux-raid@vger.kernel.org>
Cc: <dm-devel@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/bio.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -261,6 +261,7 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src) | |||
261 | */ | 261 | */ |
262 | bio->bi_vcnt = bio_src->bi_vcnt; | 262 | bio->bi_vcnt = bio_src->bi_vcnt; |
263 | bio->bi_size = bio_src->bi_size; | 263 | bio->bi_size = bio_src->bi_size; |
264 | bio->bi_idx = bio_src->bi_idx; | ||
264 | bio_phys_segments(q, bio); | 265 | bio_phys_segments(q, bio); |
265 | bio_hw_segments(q, bio); | 266 | bio_hw_segments(q, bio); |
266 | } | 267 | } |