Skip to content

Commit 08c875c

Browse files
igawaxboe
authored andcommitted
block: Use non _rcu version of list functions for tag_set_list
tag_set_list is only accessed under the tag_set_lock lock. There is no need for using the _rcu list functions. The _rcu list function were introduced to allow read access to the tag_set_list protected under RCU, see 705cda9 ("blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list") and 05b7941 ("Revert "blk-mq: don't handle TAG_SHARED in restart""). Those changes got reverted later but the cleanup commit missed a couple of places to undo the changes. Fixes: 97889f9 ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()" Signed-off-by: Daniel Wagner <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Cc: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent ef45fe4 commit 08c875c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-mq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,7 +2899,7 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
28992899
struct blk_mq_tag_set *set = q->tag_set;
29002900

29012901
mutex_lock(&set->tag_list_lock);
2902-
list_del_rcu(&q->tag_set_list);
2902+
list_del(&q->tag_set_list);
29032903
if (list_is_singular(&set->tag_list)) {
29042904
/* just transitioned to unshared */
29052905
set->flags &= ~BLK_MQ_F_TAG_SHARED;
@@ -2926,7 +2926,7 @@ static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
29262926
}
29272927
if (set->flags & BLK_MQ_F_TAG_SHARED)
29282928
queue_set_hctx_shared(q, true);
2929-
list_add_tail_rcu(&q->tag_set_list, &set->tag_list);
2929+
list_add_tail(&q->tag_set_list, &set->tag_list);
29302930

29312931
mutex_unlock(&set->tag_list_lock);
29322932
}

0 commit comments

Comments
 (0)