linux/block
Bart Van Assche 3c1db90ae0 blk-mq: Swap two calls in blk_mq_exit_queue()
[ Upstream commit 630ef623ed26c18a457cdc070cf24014e50129c2 ]

If a tag set is shared across request queues (e.g. SCSI LUNs) then the
block layer core keeps track of the number of active request queues in
tags->active_queues. blk_mq_tag_busy() and blk_mq_tag_idle() update that
atomic counter if the hctx flag BLK_MQ_F_TAG_QUEUE_SHARED is set. Make
sure that blk_mq_exit_queue() calls blk_mq_tag_idle() before that flag is
cleared by blk_mq_del_queue_tag_set().

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Fixes: 0d2602ca30 ("blk-mq: improve support for shared tags maps")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210513171529.7977-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:30 +02:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bfq-iosched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
bfq-iosched.h bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bfq-wf2q.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bio-integrity.c block: release bip in a right way in error path 2020-07-16 08:16:36 +02:00
bio.c block: only update parent bi_status when bio fail 2021-04-16 11:46:38 +02:00
blk-cgroup.c blk-cgroup: Use cond_resched() when destroy blkgs 2021-02-13 13:52:56 +01:00
blk-core.c Revert "Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"" 2021-02-07 15:35:47 +01:00
blk-exec.c
blk-flush.c blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-integrity.c
blk-ioc.c block: Fix use-after-free issue accessing struct io_cq 2020-04-17 10:50:04 +02:00
blk-iocost.c blk-iocost: ioc_pd_free() shouldn't assume irq disabled 2020-09-09 19:12:35 +02:00
blk-iolatency.c
blk-lib.c
blk-map.c
blk-merge.c block: recalculate segment count for multi-segment discards correctly 2021-03-30 14:35:28 +02:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags 2020-07-22 09:32:52 +02:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
blk-mq-sched.h block: only call sched requeue_request() for scheduled requests 2020-09-23 12:40:37 +02:00
blk-mq-sysfs.c blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue 2020-10-29 09:57:34 +01:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: Swap two calls in blk_mq_exit_queue() 2021-05-19 10:08:30 +02:00
blk-mq.h blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-pm.c scsi: block: Fix a race in the runtime power management code 2021-01-06 14:48:37 +01:00
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c blk-settings: align max_sectors on "logical_block_size" boundary 2021-03-04 10:26:40 +01:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue 2020-10-29 09:57:34 +01:00
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c block: Simplify REQ_OP_ZONE_RESET_ALL handling 2020-12-30 11:50:54 +01:00
blk.h block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bounce.c
bsg-lib.c
bsg.c bsg: free the request before return error code 2021-03-04 10:26:22 +01:00
cmdline-parser.c
compat_ioctl.c
elevator.c
genhd.c block: Suppress uevent for hidden device when removed 2021-03-30 14:35:23 +02:00
ioctl.c
ioprio.c
kyber-iosched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
mq-deadline.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c