]> err.no Git - linux-2.6/commitdiff
[SCSI] libsas: Destroy the task collector thread after releasing ports
authorDarrick J. Wong <djwong@us.ibm.com>
Thu, 11 Jan 2007 22:15:03 +0000 (14:15 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 13 Jan 2007 22:15:27 +0000 (16:15 -0600)
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>
drivers/scsi/libsas/sas_init.c

index 90cce34cb6f5e20a671e5b8d1b160dda5cf0cf41..4df73d69bb3c554cd0eac9636697f6168b3e36ac 100644 (file)
@@ -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;
 }