[PATCH] nvme-fc: do not warn on controller removal race
Daniel Wagner
dwagner at suse.de
Wed Sep 9 02:05:01 PDT 2026
On Tue, Sep 08, 2026 at 04:34:34PM +0200, Maurizio Lombardi wrote:
> In nvme_fc_reconnect_or_delete(), the system attempts to remove
> the controller when reconnect limits are reached by calling
> nvme_delete_ctrl(). This call is currently wrapped in a WARN_ON().
>
> If a user concurrently deletes the controller via sysfs, the
> controller's state may have already transitioned out of the
> CONNECTING state. When this happens, nvme_delete_ctrl() correctly
> rejects the operation and returns -EBUSY. Because of the WARN_ON()
> wrapper, this race condition triggers an unnecessary kernel warning
> stack trace.
>
> Remove the WARN_ON() macro around nvme_delete_ctrl();
> this allows the system to safely ignore the -EBUSY return value
> if the controller is already being deleted.
Yes, this makes sense.
Reviewed-by: Daniel Wagner <dwagner at suse.de >
More information about the Linux-nvme
mailing list