diff options
-rw-r--r-- | drivers/md/dm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 6264781dc69a..77ebb985154c 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -2197,6 +2197,13 @@ static void dm_init_md_queue(struct mapped_device *md) | |||
2197 | * This queue is new, so no concurrency on the queue_flags. | 2197 | * This queue is new, so no concurrency on the queue_flags. |
2198 | */ | 2198 | */ |
2199 | queue_flag_clear_unlocked(QUEUE_FLAG_STACKABLE, md->queue); | 2199 | queue_flag_clear_unlocked(QUEUE_FLAG_STACKABLE, md->queue); |
2200 | |||
2201 | /* | ||
2202 | * Initialize data that will only be used by a non-blk-mq DM queue | ||
2203 | * - must do so here (in alloc_dev callchain) before queue is used | ||
2204 | */ | ||
2205 | md->queue->queuedata = md; | ||
2206 | md->queue->backing_dev_info.congested_data = md; | ||
2200 | } | 2207 | } |
2201 | 2208 | ||
2202 | static void dm_init_old_md_queue(struct mapped_device *md) | 2209 | static void dm_init_old_md_queue(struct mapped_device *md) |
@@ -2207,10 +2214,7 @@ static void dm_init_old_md_queue(struct mapped_device *md) | |||
2207 | /* | 2214 | /* |
2208 | * Initialize aspects of queue that aren't relevant for blk-mq | 2215 | * Initialize aspects of queue that aren't relevant for blk-mq |
2209 | */ | 2216 | */ |
2210 | md->queue->queuedata = md; | ||
2211 | md->queue->backing_dev_info.congested_fn = dm_any_congested; | 2217 | md->queue->backing_dev_info.congested_fn = dm_any_congested; |
2212 | md->queue->backing_dev_info.congested_data = md; | ||
2213 | |||
2214 | blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); | 2218 | blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); |
2215 | } | 2219 | } |
2216 | 2220 | ||