]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvme-pci: refactor the tagset handling in nvme_reset_work
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Nov 2022 15:00:38 +0000 (16:00 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Nov 2022 14:35:19 +0000 (08:35 -0600)
commit0ffc7e98bfaa45380b800deeb9b65ce0371c652d
treefd4f578880e2f4621993156044f90ef16a5a6925
parent71b26083d59cd4ab22489829ffe7d4ead93f5546
nvme-pci: refactor the tagset handling in nvme_reset_work

The code to create, update or delete a tagset and namespaces in
nvme_reset_work is a bit convoluted.  Refactor it with a two high-level
conditionals for first probe vs reset and I/O queues vs no I/O queues
to make the code flow more clear.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20221101150050.3510-3-hch@lst.de
[axboe: fix whitespace issue]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c