iscsi: delete spdk_iscsi_init_grp_deletable() function
This function was only useful for old (and incorrect) iSCSI topology with SPDK. Hence this function can be removed. Change-Id: I6147382b0731a896df3c988fae0173923a9a85fc Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/381242 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: John Kariuki <John.K.Kariuki@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
072d90ccc8
commit
6bb01df6d7
@ -342,36 +342,6 @@ spdk_initiator_group_unregister(struct spdk_iscsi_init_grp *ig)
|
||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
||||
}
|
||||
|
||||
int
|
||||
spdk_iscsi_init_grp_deletable(int tag)
|
||||
{
|
||||
int ret = 0;
|
||||
struct spdk_iscsi_init_grp *ig;
|
||||
|
||||
pthread_mutex_lock(&g_spdk_iscsi.mutex);
|
||||
ig = spdk_iscsi_init_grp_find_by_tag(tag);
|
||||
if (ig == NULL) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ig->state != GROUP_READY) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ig->ref == 0) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
if (ret == 0)
|
||||
ig->state = GROUP_DESTROY;
|
||||
pthread_mutex_unlock(&g_spdk_iscsi.mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_iscsi_init_grp_release(struct spdk_iscsi_init_grp *ig)
|
||||
{
|
||||
|
@ -71,6 +71,5 @@ void spdk_iscsi_init_grp_register(struct spdk_iscsi_init_grp *ig);
|
||||
|
||||
int spdk_iscsi_init_grp_array_create(void);
|
||||
void spdk_iscsi_init_grp_array_destroy(void);
|
||||
int spdk_iscsi_init_grp_deletable(int tag);
|
||||
|
||||
#endif // SPDK_INIT_GRP_H
|
||||
|
@ -263,10 +263,6 @@ spdk_rpc_delete_initiator_group(struct spdk_jsonrpc_request *request,
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
if (spdk_iscsi_init_grp_deletable(req.tag)) {
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
ig = spdk_iscsi_init_grp_find_by_tag(req.tag);
|
||||
if (!ig) {
|
||||
goto invalid;
|
||||
|
Loading…
Reference in New Issue
Block a user