blk-mq: Swap two calls in blk_mq_exit_queue()
Bart Van Assche authored
[ Upstream commit 630ef623 ]

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: 0d2602ca

 ("blk-mq: improve support for shared tags maps")
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210513171529.7977-1-bvanassche@acm.org

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
5e9e6d11
Name Last commit Last update
..
partitions block: don't create too many partitions
Kconfig blk-wbt: Remove obsolete multiqueue I/O scheduling comment
Kconfig.iosched treewide: replace '---help---' in Kconfig files with 'help'
Makefile blk-mq: merge blk-softirq.c into blk-mq.c
badblocks.c treewide: Use fallthrough pseudo-keyword
bfq-cgroup.c bfq: fix blkio cgroup leakage v4
bfq-iosched.c kyber: fix out of bounds access when preempted
bfq-iosched.h block, bfq: make waker-queue detection more robust
bfq-wf2q.c bfq: don't duplicate code for different paths
bio-integrity.c block: use bi_max_vecs to find the bvec pool
bio.c block: only update parent bi_status when bio fail
blk-cgroup-rwstat.c blk-cgroup: Fix the recursive blkg rwstat
blk-cgroup-rwstat.h blk-cgroup: separate out blkg_rwstat under CONFIG_BLK_CGROUP_RWSTAT
blk-cgroup.c Merge tag 'for-5.12/block-2021-02-17' of git://git.kernel.dk/linux-block
blk-core.c block: get rid of the trace rq insert wrapper
blk-crypto-fallback.c block: rename BIO_MAX_PAGES to BIO_MAX_VECS
blk-crypto-internal.h block: make blk_crypto_rq_bio_prep() able to fail
blk-crypto.c dm: support key eviction from keyslot managers of underlying devices
blk-exec.c block: drop removed argument from kernel-doc of blk_execute_rq()
blk-flush.c block: use an on-stack bio in blkdev_issue_flush
blk-integrity.c block: remove the unused blk_integrity_merge_bio export
blk-ioc.c block: remove retry loop in ioc_release_fn()
blk-iocost.c blk-iocost: fix weight updates of inner active iocgs
blk-iolatency.c block: Remove redundant 'return' statement
blk-lib.c block: rename BIO_MAX_PAGES to BIO_MAX_VECS
blk-map.c
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h
bounce.c
bsg-lib.c
bsg.c
cmdline-parser.c
elevator.c
genhd.c
ioctl.c
ioprio.c
keyslot-manager.c
kyber-iosched.c
mq-deadline.c
opal_proto.h
scsi_ioctl.c
sed-opal.c
t10-pi.c