[PATCH v3 2/4] nvme-fc: reorganize ctrl ref-counting and cleanup code
Hannes Reinecke
hare at suse.de
Mon Sep 1 23:45:53 PDT 2025
On 8/29/25 17:37, Daniel Wagner wrote:
> The lifetime of the controller is managed by the upper layers. This
> ensures that the controller does not go away as long as there are
> commands in flight. Thus, there is no need to take references in the
> command handling code.
>
> Currently, the refcounting code is partially open-coded for handling
> error paths. By moving the cleanup code fully under refcounting and
> releasing references when necessary, the error handling can be
> simplified.
>
> Signed-off-by: Daniel Wagner <wagi at kernel.org>
> ---
> drivers/nvme/host/fc.c | 102 ++++++++++++++++---------------------------------
> 1 file changed, 32 insertions(+), 70 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list