[PATCHv8] nvme: fix refcounting imbalance when all paths are down
Keith Busch
kbusch at kernel.org
Tue Jul 13 14:23:08 PDT 2021
On Thu, Jun 24, 2021 at 10:55:46AM +0200, Hannes Reinecke wrote:
> When the last path to a ns_head drops the current code
> removes the ns_head from the subsystem list, but will only
> delete the disk itself if the last reference to the ns_head
> drops. This is causing an refcounting imbalance eg when
> applications have a reference to the disk, as then they'll
> never get notified that the disk is in fact dead.
> This patch moves the call 'del_gendisk' into nvme_mpath_check_last_path(),
> ensuring that the disk can be properly removed and applications get the
> appropriate notifications.
I think you may have tried every possible way to address the underlying
issue. :)
This most recent one looks good to me, too.
Reviewed-by: Keith Busch <kbusch at kernel.org>
More information about the Linux-nvme
mailing list