[PATCH 1/1] nvmet-fcloop: Check remoteport port_state before calling done callback

Keith Busch kbusch at kernel.org
Thu Feb 26 14:36:18 PST 2026


On Thu, Dec 04, 2025 at 12:26:13PM -0800, Justin Tee wrote:
> In nvme_fc_handle_ls_rqst_work, the lsrsp->done callback is only set when
> remoteport->port_state is FC_OBJSTATE_ONLINE.  Otherwise, the
> nvme_fc_xmt_ls_rsp's LLDD call to lport->ops->xmt_ls_rsp is expected to
> fail and the nvme-fc transport layer itself will directly call
> nvme_fc_xmt_ls_rsp_free instead of relying on LLDD's done callback to free
> the lsrsp resources.
> 
> Update the fcloop_t2h_xmt_ls_rsp routine to check remoteport->port_state.
> If online, then lsrsp->done callback will free the lsrsp.  Else, return
> -ENODEV to signal the nvme-fc transport to handle freeing lsrsp.

Thanks, queued up for nvme-7.0.



More information about the Linux-nvme mailing list