Loading
bdev/nvme: fix ref get in populate namepsace flow
Consider the case when there is only one reference (NVMe ctrlr creation), and a populate namespace operation is outstanding (delayed for whatever reason). If spdk_bdev_nvme_delete is invoked before it completes, _nvme_ctrlr_destruct can then put the last reference. To fix this, the reference should be acquired before the async operation and not after. Found by code inspection. Change-Id: Ia7c0fe5d7f4e63df58054d93956c4647d7f6fd21 Signed-off-by:Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26753 Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>