iscsi: Remove unnecessary mutex to read a variable for CHAP authentication
Remove mutex to guard discovery_auth_group in spdk_iscsi_get_authinfo() because update of discovery_auth_group is atomic even no mutex. Change-Id: Id9ddcb84c2fc3c820984e52dda7ca73839497e24 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/422765 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
83d439f18d
commit
785e7fc354
@ -689,9 +689,7 @@ spdk_iscsi_get_authinfo(struct spdk_iscsi_conn *conn, const char *authuser)
|
|||||||
ag_tag = -1;
|
ag_tag = -1;
|
||||||
}
|
}
|
||||||
if (ag_tag < 0) {
|
if (ag_tag < 0) {
|
||||||
pthread_mutex_lock(&g_spdk_iscsi.mutex);
|
|
||||||
ag_tag = g_spdk_iscsi.chap_group;
|
ag_tag = g_spdk_iscsi.chap_group;
|
||||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
|
||||||
}
|
}
|
||||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "ag_tag=%d\n", ag_tag);
|
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "ag_tag=%d\n", ag_tag);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user