aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2014-10-17 19:46:35 -0400
committerJens Axboe <axboe@fb.com>2015-01-28 11:44:11 -0500
commitfebf71588c2a750e04dc2a8b0824ce120c48bd9e (patch)
tree2f1c48dda46cd66ec3d72b025753cd5c856e6a7c /drivers/md
parent24391c0dc57c3756a219defaa781e68637d6ab7d (diff)
block: require blk_rq_prep_clone() be given an initialized clone request
Prepare to allow blk_rq_prep_clone() to accept clone requests that were allocated from blk-mq request queues. As such the blk_rq_prep_clone() caller must first initialize the clone request. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index b98cd9d84435..f251633a51af 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1719,6 +1719,7 @@ static int setup_clone(struct request *clone, struct request *rq,
1719{ 1719{
1720 int r; 1720 int r;
1721 1721
1722 blk_rq_init(NULL, rq);
1722 r = blk_rq_prep_clone(clone, rq, tio->md->bs, GFP_ATOMIC, 1723 r = blk_rq_prep_clone(clone, rq, tio->md->bs, GFP_ATOMIC,
1723 dm_rq_bio_constructor, tio); 1724 dm_rq_bio_constructor, tio);
1724 if (r) 1725 if (r)