Commit cde3f74b authored by Darrick J. Wong's avatar Darrick J. Wong Committed by James Bottomley
Browse files

[SCSI] libsas: Destroy the task collector thread after releasing ports



If we use task collector mode, we can end up destroying the task collector
thread before we release the ports, which is bad if a port release causes
a disk I/O (such as cache flushing).

Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 6d4dcd4d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -127,12 +127,13 @@ Undo_phys:

int sas_unregister_ha(struct sas_ha_struct *sas_ha)
{
	sas_unregister_ports(sas_ha);

	if (sas_ha->lldd_max_execute_num > 1) {
		sas_shutdown_queue(sas_ha);
		sas_ha->lldd_max_execute_num = 1;
	}

	sas_unregister_ports(sas_ha);

	return 0;
}