aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 07:57:33 -0400
committerTejun Heo <htejun@gmail.com>2006-05-15 07:57:33 -0400
commit158693031d7c58a355ec1852052a4fca75fd3bda (patch)
tree2afbc7cb635746b2b6f2a6b6b5c64e9c62777168 /drivers/scsi
parent7401abf2f44695ef44eef47d5deba1c20214a063 (diff)
[PATCH] libata: hold host_set lock while finishing internal qc
Hold host_set lock while finishing internal qc. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 86cd0e0895d..13bce43f191 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1031,6 +1031,9 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
1031 spin_unlock_irqrestore(&ap->host_set->lock, flags); 1031 spin_unlock_irqrestore(&ap->host_set->lock, flags);
1032 } 1032 }
1033 1033
1034 /* finish up */
1035 spin_lock_irqsave(&ap->host_set->lock, flags);
1036
1034 *tf = qc->tf; 1037 *tf = qc->tf;
1035 err_mask = qc->err_mask; 1038 err_mask = qc->err_mask;
1036 1039
@@ -1052,6 +1055,8 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
1052 ata_port_probe(ap); 1055 ata_port_probe(ap);
1053 } 1056 }
1054 1057
1058 spin_unlock_irqrestore(&ap->host_set->lock, flags);
1059
1055 return err_mask; 1060 return err_mask;
1056} 1061}
1057 1062