ublk: update func ublk_try_close_dev

Merge function _ublk_try_close_dev() directly into
function ublk_try_close_dev.

Change-Id: Ib4df28f1d69f56d72e3eeaeb2220eb15f5c37440
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16417
Reviewed-by: <yifan.bian@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Liu Xiaodong 2023-01-23 11:41:55 -05:00 committed by Jim Harris
parent 0f2f145963
commit 120eb84454

View File

@ -722,15 +722,15 @@ _ublk_close_dev_retry(void *arg)
return SPDK_POLLER_BUSY;
}
static int
_ublk_try_close_dev(void *arg)
static void
ublk_try_close_dev(void *arg)
{
struct spdk_ublk_dev *ublk = arg;
assert(spdk_get_thread() == ublk->app_thread);
ublk->queues_closed += 1;
if (ublk->queues_closed < ublk->num_queues) {
return SPDK_POLLER_BUSY;
return;
}
if (ublk->ctrl_ops_in_progress > 0) {
@ -738,18 +738,9 @@ _ublk_try_close_dev(void *arg)
ublk->retry_count = UBLK_STOP_BUSY_WAITING_MS * 1000ULL / UBLK_BUSY_POLLING_INTERVAL_US;
ublk->retry_poller = SPDK_POLLER_REGISTER(_ublk_close_dev_retry, ublk,
UBLK_BUSY_POLLING_INTERVAL_US);
return SPDK_POLLER_BUSY;
} else {
ublk_delete_dev(ublk);
}
return SPDK_POLLER_BUSY;
}
static void
ublk_try_close_dev(void *arg)
{
_ublk_try_close_dev(arg);
}
static void