Skip to content

Commit fe10697

Browse files
mikechristieSuraj Jitindar Singh
authored and
Suraj Jitindar Singh
committed
scsi: iscsi: Move pool freeing
commit a1f3486 upstream. This doesn't fix any bugs, but it makes more sense to free the pool after we have removed the session. At that time we know nothing is touching any of the session fields, because all devices have been removed and scans are stopped. Link: https://lore.kernel.org/r/20210525181821.7617-19-michael.christie@oracle.com Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Nathan Gao <zcgao@amazon.com>
1 parent 2ddaa77 commit fe10697

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/libiscsi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,10 +2902,9 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
29022902
struct module *owner = cls_session->transport->owner;
29032903
struct Scsi_Host *shost = session->host;
29042904

2905-
iscsi_pool_free(&session->cmdpool);
2906-
29072905
iscsi_remove_session(cls_session);
29082906

2907+
iscsi_pool_free(&session->cmdpool);
29092908
kfree(session->password);
29102909
kfree(session->password_in);
29112910
kfree(session->username);

0 commit comments

Comments
 (0)