Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341634 > unrolled thread
| Started by | Bob Liu <bob.liu@oracle.com> |
|---|---|
| First post | 2016-02-24 09:20 +0100 |
| Last post | 2016-02-24 18:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] dm: drop unnecessary assignment of md->queue Bob Liu <bob.liu@oracle.com> - 2016-02-24 09:20 +0100
Re: dm: drop unnecessary assignment of md->queue Mike Snitzer <snitzer@redhat.com> - 2016-02-24 18:00 +0100
| From | Bob Liu <bob.liu@oracle.com> |
|---|---|
| Date | 2016-02-24 09:20 +0100 |
| Subject | [PATCH] dm: drop unnecessary assignment of md->queue |
| Message-ID | <r5CPU-1G8-9@gated-at.bofh.it> |
md->queue and q are the same thing in dm_init_request_based_queue() and
dm_init_request_based_blk_mq_queue().
Also drop the temporary struct request_queue *q.
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
drivers/md/dm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 5df4048..4f1f317 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2605,17 +2605,13 @@ static void init_rq_based_worker_thread(struct mapped_device *md)
*/
static int dm_init_request_based_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_old_md_queue(md);
blk_queue_softirq_done(md->queue, dm_softirq_done);
blk_queue_prep_rq(md->queue, dm_prep_fn);
@@ -2740,7 +2736,6 @@ static int dm_init_request_based_blk_mq_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 */
--
1.7.10.4
[toc] | [next] | [standalone]
| From | Mike Snitzer <snitzer@redhat.com> |
|---|---|
| Date | 2016-02-24 18:00 +0100 |
| Subject | Re: dm: drop unnecessary assignment of md->queue |
| Message-ID | <r5KX8-7jg-7@gated-at.bofh.it> |
| In reply to | #1341634 |
On Wed, Feb 24 2016 at 3:15am -0500, Bob Liu <bob.liu@oracle.com> wrote: > md->queue and q are the same thing in dm_init_request_based_queue() and > dm_init_request_based_blk_mq_queue(). > > Also drop the temporary struct request_queue *q. Yeah, I carried the extra assignment just as a form of documentation but your patch is correct (they aren't needed). I've rebased your patch ontop of linux-dm.git's 'dm-4.6' and have staged it in linux-next.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web