block: fix missing queue put in error path
authorJens Axboe <axboe@kernel.dk>
Mon, 15 Nov 2021 21:23:08 +0000 (14:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Nov 2021 00:00:54 +0000 (17:00 -0700)
commit95febeb61bf87ca803a1270498cd4cd61554a68f
treea9af8b4f82ad0afa875748aac6be944709158ef4
parent94c4b4fd25e6c3763941bdec3ad54f2204afa992
block: fix missing queue put in error path

If we fail the submission queue checks, we don't put the queue afterwards.
This can cause various issues like stalls on scheduler switch or failure
to remove the device, or like in the original bug report, timeout waiting
for the device on reboot/restart.

While in there, fix a few whitespace discrepancies in the surrounding
code.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215039
Fixes: b637108a4022 ("blk-mq: fix filesystem I/O request allocation")
Reported-and-tested-by: Stephen Smith <stephenmsmith@blueyonder.co.uk>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c