[PATCH 2/8] Revert "blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list"
Ming Lei
ming.lei at redhat.com
Sun Apr 25 09:57:47 BST 2021
This reverts commit a8a6ac7ad3fb6b84b933ca1ea5110998bdaeee17.
Signed-off-by: Ming Lei <ming.lei at redhat.com>
---
block/blk-mq.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7d2ea6357c7d..8b59f6b4ec8e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2947,7 +2947,7 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
struct blk_mq_tag_set *set = q->tag_set;
mutex_lock(&set->tag_list_lock);
- list_del_rcu(&q->tag_set_list);
+ list_del(&q->tag_set_list);
if (list_is_singular(&set->tag_list)) {
/* just transitioned to unshared */
set->flags &= ~BLK_MQ_F_TAG_QUEUE_SHARED;
@@ -2955,11 +2955,7 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
blk_mq_update_tag_set_shared(set, false);
}
mutex_unlock(&set->tag_list_lock);
- /*
- * Calling synchronize_rcu() and INIT_LIST_HEAD(&q->tag_set_list) is
- * not necessary since blk_mq_del_queue_tag_set() is only called from
- * blk_cleanup_queue().
- */
+ INIT_LIST_HEAD(&q->tag_set_list);
}
static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
--
2.29.2
More information about the Linux-nvme
mailing list