summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-12 09:24:57 -0600
committerJens Axboe <axboe@kernel.dk>2018-10-14 12:49:40 -0600
commit5e27891e88555fecd8262e110e1a29feca4b0166 (patch)
tree8d7762fca759cd2319014e6d12ebef67b568ea2e /block/blk-core.c
parente50b1e327aeb4b224364aa6f85c1713ff8b3654b (diff)
downloadblackbird-op-linux-5e27891e88555fecd8262e110e1a29feca4b0166.tar.gz
blackbird-op-linux-5e27891e88555fecd8262e110e1a29feca4b0166.zip
block: remove bogus check for queue_lock assignment
We just allocated the queue and haven't even set it up yet, hence we know that checking if ->mq_ops is NULL is always going to be true. In fact we do need to assign a lock to ->queue_lock always, as we need it for the queue flags modifications. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index c5539eed0202..cdfabc5646da 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1054,8 +1054,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id,
mutex_init(&q->sysfs_lock);
spin_lock_init(&q->__queue_lock);
- if (!q->mq_ops)
- q->queue_lock = lock ? : &q->__queue_lock;
+ q->queue_lock = lock ? : &q->__queue_lock;
/*
* A queue starts its life with bypass turned on to avoid
OpenPOWER on IntegriCloud