Skip to content

Commit

Permalink
[SCSI] libsas: Destroy the task collector thread after releasing ports
Browse files Browse the repository at this point in the history
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: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Darrick J. Wong authored and James Bottomley committed Jan 13, 2007
1 parent 6d4dcd4 commit cde3f74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/scsi/libsas/sas_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ int sas_register_ha(struct sas_ha_struct *sas_ha)

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;
}

Expand Down

0 comments on commit cde3f74

Please sign in to comment.