Commit 109af0bc authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

bdev/nvme: don't check spdk_nvme_ctrlr_free_io_qpair return



spdk_nvme_ctrlr_free_io_qpair now always returns 0, so
update the code to account for that.

Fixes issue #2012.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61c78459472573adbfeb28052ae3379d7880567c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8660


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 4246e79c
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
@@ -432,20 +432,13 @@ err:
	return rc;
}

static int
static void
bdev_nvme_destroy_qpair(struct nvme_io_path *io_path)
{
	int rc;

	if (io_path->qpair == NULL) {
		return 0;
	}

	rc = spdk_nvme_ctrlr_free_io_qpair(io_path->qpair);
	if (!rc) {
	if (io_path->qpair != NULL) {
		spdk_nvme_ctrlr_free_io_qpair(io_path->qpair);
		io_path->qpair = NULL;
	}
	return rc;
}

static void
@@ -621,11 +614,9 @@ _bdev_nvme_reset_destroy_qpair(struct spdk_io_channel_iter *i)
{
	struct spdk_io_channel *ch = spdk_io_channel_iter_get_channel(i);
	struct nvme_io_path *io_path = spdk_io_channel_get_ctx(ch);
	int rc;

	rc = bdev_nvme_destroy_qpair(io_path);

	spdk_for_each_channel_continue(i, rc);
	bdev_nvme_destroy_qpair(io_path);
	spdk_for_each_channel_continue(i, 0);
}

static int