[Patch 10/10] dm: drop BIO_SEG_VALID bit

From: Joe Thornber
Date: Tue Feb 10 2004 - 12:57:17 EST


I just noticed that bio_clone copies the BIO_SEG_VALID bit from the
original bio when it was set. When we modify bi_idx or bi_vcnt
afterwards the segment counts are invalid and the bit must be dropped
(though it is fairly unlikely that it has already been set).
[Christophe Saout]
--- diff/drivers/md/dm.c 2004-02-10 16:12:10.000000000 +0000
+++ source/drivers/md/dm.c 2004-02-10 16:12:17.000000000 +0000
@@ -338,6 +338,7 @@
clone->bi_idx = idx;
clone->bi_vcnt = idx + bv_count;
clone->bi_size = to_bytes(len);
+ clone->bi_flags &= ~(1 << BIO_SEG_VALID);

return clone;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/