diff options
author | Bob Liu <bob.liu@oracle.com> | 2016-02-24 09:15:38 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-03-10 23:12:07 +0100 |
commit | e233d800a9648f2c0802aa23250d9c8af57bab43 (patch) | |
tree | e60f29182c25ad098e8b3754528c9acb1c286da8 /drivers/md | |
parent | dm: reorder 'struct mapped_device' members to fix alignment and holes (diff) | |
download | linux-e233d800a9648f2c0802aa23250d9c8af57bab43.tar.xz linux-e233d800a9648f2c0802aa23250d9c8af57bab43.zip |
dm: drop unnecessary assignment of md->queue
md->queue and q are the same thing in dm_old_init_request_queue() and
dm_mq_init_request_queue().
Also drop the temporary 'struct request_queue *q' in
dm_old_init_request_queue().
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 503988ff66ea..9c9272bdc364 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2654,17 +2654,13 @@ static void dm_old_init_rq_based_worker_thread(struct mapped_device *md) */ static int dm_old_init_request_queue(struct mapped_device *md) { - struct request_queue *q = NULL; - /* Fully initialize the queue */ - q = blk_init_allocated_queue(md->queue, dm_request_fn, NULL); - if (!q) + if (!blk_init_allocated_queue(md->queue, dm_request_fn, NULL)) return -EINVAL; /* disable dm_request_fn's merge heuristic by default */ md->seq_rq_merge_deadline_usecs = 0; - md->queue = q; dm_init_normal_md_queue(md); blk_queue_softirq_done(md->queue, dm_softirq_done); blk_queue_prep_rq(md->queue, dm_old_prep_fn); @@ -2783,7 +2779,6 @@ static int dm_mq_init_request_queue(struct mapped_device *md, err = PTR_ERR(q); goto out_tag_set; } - md->queue = q; dm_init_md_queue(md); /* backfill 'mq' sysfs registration normally done in blk_register_queue */ |