mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[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 <[email protected]> for doggedly chasing this one down. Acked-by: Jens Axboe <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
577a4f8102
commit
a5453be48e
1 changed files with 1 additions and 0 deletions
1
fs/bio.c
1
fs/bio.c
|
|
@ -261,6 +261,7 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src)
|
|||
*/
|
||||
bio->bi_vcnt = bio_src->bi_vcnt;
|
||||
bio->bi_size = bio_src->bi_size;
|
||||
bio->bi_idx = bio_src->bi_idx;
|
||||
bio_phys_segments(q, bio);
|
||||
bio_hw_segments(q, bio);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue