libiscsi.c (1c83469d36a9dd30dbf1fb9fc5ca3be3a0e64ff4) | libiscsi.c (63f75cc8a7e6ce453e38a7b90cdcae83d63f1ea7) |
---|---|
1/* 2 * iSCSI lib functions 3 * 4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved. 5 * Copyright (C) 2004 - 2006 Mike Christie 6 * Copyright (C) 2004 - 2005 Dmitry Yusupov 7 * Copyright (C) 2004 - 2005 Alex Aizman 8 * maintained by open-iscsi@googlegroups.com --- 1323 unchanged lines hidden (view full) --- 1332 * 1333 * This can be used by software iscsi_transports that allocate 1334 * a session per scsi host. 1335 **/ 1336void iscsi_session_teardown(struct iscsi_cls_session *cls_session) 1337{ 1338 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); 1339 struct iscsi_session *session = iscsi_hostdata(shost->hostdata); | 1/* 2 * iSCSI lib functions 3 * 4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved. 5 * Copyright (C) 2004 - 2006 Mike Christie 6 * Copyright (C) 2004 - 2005 Dmitry Yusupov 7 * Copyright (C) 2004 - 2005 Alex Aizman 8 * maintained by open-iscsi@googlegroups.com --- 1323 unchanged lines hidden (view full) --- 1332 * 1333 * This can be used by software iscsi_transports that allocate 1334 * a session per scsi host. 1335 **/ 1336void iscsi_session_teardown(struct iscsi_cls_session *cls_session) 1337{ 1338 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); 1339 struct iscsi_session *session = iscsi_hostdata(shost->hostdata); |
1340 struct module *owner = cls_session->transport->owner; |
|
1340 1341 scsi_remove_host(shost); 1342 1343 iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); 1344 iscsi_pool_free(&session->cmdpool, (void**)session->cmds); 1345 1346 iscsi_destroy_session(cls_session); 1347 scsi_host_put(shost); | 1341 1342 scsi_remove_host(shost); 1343 1344 iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); 1345 iscsi_pool_free(&session->cmdpool, (void**)session->cmds); 1346 1347 iscsi_destroy_session(cls_session); 1348 scsi_host_put(shost); |
1348 module_put(cls_session->transport->owner); | 1349 module_put(owner); |
1349} 1350EXPORT_SYMBOL_GPL(iscsi_session_teardown); 1351 1352/** 1353 * iscsi_conn_setup - create iscsi_cls_conn and iscsi_conn 1354 * @cls_session: iscsi_cls_session 1355 * @conn_idx: cid 1356 **/ --- 532 unchanged lines hidden --- | 1350} 1351EXPORT_SYMBOL_GPL(iscsi_session_teardown); 1352 1353/** 1354 * iscsi_conn_setup - create iscsi_cls_conn and iscsi_conn 1355 * @cls_session: iscsi_cls_session 1356 * @conn_idx: cid 1357 **/ --- 532 unchanged lines hidden --- |