ublk: move fake timeout logic into __ublk_complete_rq()
authorMing Lei <ming.lei@redhat.com>
Sun, 13 Jul 2025 14:33:58 +0000 (22:33 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Jul 2025 14:04:16 +0000 (08:04 -0600)
commit7074feeca41d09713d70e619a34d9e7b4e219f8c
tree4623678072bcb572823a56de16589b7fdd9d35b5
parentdd7a8507319e22141fa2e107d81cba18a4007d92
ublk: move fake timeout logic into __ublk_complete_rq()

Almost every block driver deals with fake timeout logic around real
request completion code.

Also the existing way may cause request reference count leak, so move the
logic into __ublk_complete_rq(), then we can skip the completion in the
last step like other drivers.

Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250713143415.2857561-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c