Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme-loop: use nvme core helpers to cancel all requests in a tagset

A helper now exist, no need to open-code the same functionality.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Sagi Grimberg and committed by
Jens Axboe
e41f8c02 b10907b8

+2 -6
+2 -6
drivers/nvme/target/loop.c
··· 424 424 { 425 425 if (ctrl->ctrl.queue_count > 1) { 426 426 nvme_stop_queues(&ctrl->ctrl); 427 - blk_mq_tagset_busy_iter(&ctrl->tag_set, 428 - nvme_cancel_request, &ctrl->ctrl); 429 - blk_mq_tagset_wait_completed_request(&ctrl->tag_set); 427 + nvme_cancel_tagset(&ctrl->ctrl); 430 428 nvme_loop_destroy_io_queues(ctrl); 431 429 } 432 430 ··· 432 434 if (ctrl->ctrl.state == NVME_CTRL_LIVE) 433 435 nvme_shutdown_ctrl(&ctrl->ctrl); 434 436 435 - blk_mq_tagset_busy_iter(&ctrl->admin_tag_set, 436 - nvme_cancel_request, &ctrl->ctrl); 437 - blk_mq_tagset_wait_completed_request(&ctrl->admin_tag_set); 437 + nvme_cancel_admin_tagset(&ctrl->ctrl); 438 438 nvme_loop_destroy_admin_queue(ctrl); 439 439 } 440 440