Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0067d4b0 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Jens Axboe
Browse files

blk-mq: Fix tagset reinit in the presence of cpu hot-unplug



In case cpu was unplugged, we need to make sure not to assume
that the tags for that cpu are still allocated. so check
for null tags when reinitializing a tagset.

Reported-by: default avatarYi Zhang <yizhan@redhat.com>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent f5fe1b51
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -295,6 +295,9 @@ int blk_mq_reinit_tagset(struct blk_mq_tag_set *set)
	for (i = 0; i < set->nr_hw_queues; i++) {
		struct blk_mq_tags *tags = set->tags[i];

		if (!tags)
			continue;

		for (j = 0; j < tags->nr_tags; j++) {
			if (!tags->static_rqs[j])
				continue;