/* The driver must have called iscsi_remove_session before calling this.  */
void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
/* The driver must have called iscsi_remove_session before calling this.  */
void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
{
	struct iscsi_session *session = cls_session->dd_data;
	struct module *owner = cls_session->transport->owner;
	struct Scsi_Host *shost = session->host;
	iscsi_pool_free(&session->cmdpool);
	kfree(session->password);
	kfree(session->password_in);
	kfree(session->username);
	kfree(session->username_in);
	kfree(session->targetname);
	kfree(session->initiatorname);
	kfree(session->ifacename);
	iscsi_destroy_session(cls_session);
	iscsi_host_dec_session_cnt(shost);
	module_put(owner);
}