]> git.hungrycats.org Git - linux/commitdiff
[PATCH] dm: Correct clone info initialisation
authorJoe Thornber <joe@fib011235813.fsnet.co.uk>
Wed, 8 Jan 2003 01:53:56 +0000 (17:53 -0800)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Wed, 8 Jan 2003 01:53:56 +0000 (17:53 -0800)
Initialize the clone-info's index to the original bio's index.
Required to properly handle stacking DM devices. [Kevin Corry]

drivers/md/dm.c

index e6348774b643cc2506f224404167af747000f286..95bea07294c0814242e5eaa3bda9be5e60bfe5b3 100644 (file)
@@ -475,7 +475,7 @@ static void __split_bio(struct mapped_device *md, struct bio *bio)
        ci.io->md = md;
        ci.sector = bio->bi_sector;
        ci.sector_count = bio_sectors(bio);
-       ci.idx = 0;
+       ci.idx = bio->bi_idx;
 
        atomic_inc(&md->pending);
        while (ci.sector_count)