Re: [PATCH] nvmet-fc: skip hostport ops when the LLDD has no host handle

From: Christoph Hellwig

Date: Thu Oct 15 2026 - 02:16:05 EST


On Wed, Oct 14, 2026 at 03:53:03PM +0800, kensanya@xxxxxxx wrote:
> From: TanZheng <tanzheng@xxxxxxxxxx>
>
> nvmet_fc_alloc_hostport() returns NULL when the LLDD passes a NULL
> hosthandle. That is not an ERR_PTR, so nvmet_fc_alloc_target_assoc()
> keeps the association and leaves assoc->hostport NULL.

A NULL hosthandle doesn't make much sense, so why do you want to handle
that?