[PATCH 2/3] nvmet: use port's tr_ops in nvmet_disable_port
Christoph Hellwig
hch at lst.de
Mon Sep 22 10:33:53 PDT 2025
On Sun, Sep 21, 2025 at 02:49:42AM +0300, Max Gurtovoy wrote:
> Use the port's tr_ops pointer when disabling a port, instead of looking
> up the ops by the transport type. An enabled port is guaranteed to have
> a valid reference to its fabrics ops.
>
> Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
> ---
> drivers/nvme/target/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index 9f5159f04bbd..f31c7fa70740 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -388,10 +388,11 @@ void nvmet_disable_port(struct nvmet_port *port)
> if (!port->enabled)
> return;
>
> + ops = port->tr_ops;
> +
Please assign ops in the line declaring it.
Otherwise this looks fine.
More information about the Linux-nvme
mailing list