From c018b19bf389818fbb0d8980f21cd36dddcd3a5e Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 8 Nov 2021 20:14:37 +0800 Subject: [PATCH] vhost: remove unnecessary vhost lock _stop_session() is called while holding the global vhost lock, and in the caller we do release the vhost lock, so even for the error return from device backend, we don't need to release it in _stop_session(). Change-Id: I08fef64f900bb42ee68bf02b4c4f1406e903a8a6 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10142 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Dong Yi Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index edae5938e..211e211ee 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -1213,7 +1213,6 @@ _stop_session(struct spdk_vhost_session *vsession) rc = vdev->backend->stop_session(vsession); if (rc != 0) { SPDK_ERRLOG("Couldn't stop device with vid %d.\n", vsession->vid); - pthread_mutex_unlock(&g_vhost_mutex); return rc; }