dm: fix multipath regression due to initializing wrong request
authorMike Snitzer <snitzer@redhat.com>
Mon, 9 Feb 2015 17:21:54 +0000 (12:21 -0500)
committerJens Axboe <axboe@fb.com>
Mon, 9 Feb 2015 17:46:08 +0000 (10:46 -0700)
Commit febf715 ("block: require blk_rq_prep_clone() be given an
initialized clone request") introduced a regression by calling
blk_rq_init() on the original request rather than the clone
request that is passed to setup_clone().

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Fixes: febf71588c2a ("block: require blk_rq_prep_clone() be given an initialized clone request")
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/md/dm.c

index f251633a51af28e43cb43aba9f161dd6762cae24..71e6b73fe78d23a96ed2a6bfc60382efc2ac8497 100644 (file)
@@ -1719,7 +1719,7 @@ static int setup_clone(struct request *clone, struct request *rq,
 {
        int r;
 
-       blk_rq_init(NULL, rq);
+       blk_rq_init(NULL, clone);
        r = blk_rq_prep_clone(clone, rq, tio->md->bs, GFP_ATOMIC,
                              dm_rq_bio_constructor, tio);
        if (r)