Merge tag 'nios2-v4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan...
[linux-2.6-microblaze.git] / drivers / nvme / host / multipath.c
index 060f69e..956e0b8 100644 (file)
@@ -44,12 +44,12 @@ void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl)
 {
        struct nvme_ns *ns;
 
-       mutex_lock(&ctrl->namespaces_mutex);
+       down_read(&ctrl->namespaces_rwsem);
        list_for_each_entry(ns, &ctrl->namespaces, list) {
                if (ns->head->disk)
                        kblockd_schedule_work(&ns->head->requeue_work);
        }
-       mutex_unlock(&ctrl->namespaces_mutex);
+       up_read(&ctrl->namespaces_rwsem);
 }
 
 static struct nvme_ns *__nvme_find_path(struct nvme_ns_head *head)
@@ -162,13 +162,13 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
        if (!(ctrl->subsys->cmic & (1 << 1)) || !multipath)
                return 0;
 
-       q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE);
+       q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL);
        if (!q)
                goto out;
        q->queuedata = head;
        blk_queue_make_request(q, nvme_ns_head_make_request);
        q->poll_fn = nvme_ns_head_poll;
-       queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
+       blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
        /* set to a default value for 512 until disk is validated */
        blk_queue_logical_block_size(q, 512);