diff options
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index bd4605a34f54..c62e8d111fd9 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -2851,9 +2851,6 @@ EXPORT_SYMBOL_GPL(iscsi_session_setup); | |||
2851 | /** | 2851 | /** |
2852 | * iscsi_session_teardown - destroy session, host, and cls_session | 2852 | * iscsi_session_teardown - destroy session, host, and cls_session |
2853 | * @cls_session: iscsi session | 2853 | * @cls_session: iscsi session |
2854 | * | ||
2855 | * The driver must have called iscsi_remove_session before | ||
2856 | * calling this. | ||
2857 | */ | 2854 | */ |
2858 | void iscsi_session_teardown(struct iscsi_cls_session *cls_session) | 2855 | void iscsi_session_teardown(struct iscsi_cls_session *cls_session) |
2859 | { | 2856 | { |
@@ -2863,6 +2860,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session) | |||
2863 | 2860 | ||
2864 | iscsi_pool_free(&session->cmdpool); | 2861 | iscsi_pool_free(&session->cmdpool); |
2865 | 2862 | ||
2863 | iscsi_remove_session(cls_session); | ||
2864 | |||
2866 | kfree(session->password); | 2865 | kfree(session->password); |
2867 | kfree(session->password_in); | 2866 | kfree(session->password_in); |
2868 | kfree(session->username); | 2867 | kfree(session->username); |
@@ -2877,7 +2876,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session) | |||
2877 | kfree(session->portal_type); | 2876 | kfree(session->portal_type); |
2878 | kfree(session->discovery_parent_type); | 2877 | kfree(session->discovery_parent_type); |
2879 | 2878 | ||
2880 | iscsi_destroy_session(cls_session); | 2879 | iscsi_free_session(cls_session); |
2880 | |||
2881 | iscsi_host_dec_session_cnt(shost); | 2881 | iscsi_host_dec_session_cnt(shost); |
2882 | module_put(owner); | 2882 | module_put(owner); |
2883 | } | 2883 | } |