|
@@ -2851,9 +2851,6 @@ EXPORT_SYMBOL_GPL(iscsi_session_setup);
|
|
|
/**
|
|
/**
|
|
|
* iscsi_session_teardown - destroy session, host, and cls_session
|
|
* iscsi_session_teardown - destroy session, host, and cls_session
|
|
|
* @cls_session: iscsi session
|
|
* @cls_session: iscsi session
|
|
|
- *
|
|
|
|
|
- * The driver must have called iscsi_remove_session before
|
|
|
|
|
- * calling this.
|
|
|
|
|
*/
|
|
*/
|
|
|
void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
|
|
void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
|
|
|
{
|
|
{
|
|
@@ -2863,6 +2860,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
|
|
|
|
|
|
|
|
iscsi_pool_free(&session->cmdpool);
|
|
iscsi_pool_free(&session->cmdpool);
|
|
|
|
|
|
|
|
|
|
+ iscsi_remove_session(cls_session);
|
|
|
|
|
+
|
|
|
kfree(session->password);
|
|
kfree(session->password);
|
|
|
kfree(session->password_in);
|
|
kfree(session->password_in);
|
|
|
kfree(session->username);
|
|
kfree(session->username);
|
|
@@ -2877,7 +2876,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
|
|
|
kfree(session->portal_type);
|
|
kfree(session->portal_type);
|
|
|
kfree(session->discovery_parent_type);
|
|
kfree(session->discovery_parent_type);
|
|
|
|
|
|
|
|
- iscsi_destroy_session(cls_session);
|
|
|
|
|
|
|
+ iscsi_free_session(cls_session);
|
|
|
|
|
+
|
|
|
iscsi_host_dec_session_cnt(shost);
|
|
iscsi_host_dec_session_cnt(shost);
|
|
|
module_put(owner);
|
|
module_put(owner);
|
|
|
}
|
|
}
|