diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 20:57:33 +0900 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 20:57:33 +0900 |
commit | 158693031d7c58a355ec1852052a4fca75fd3bda (patch) | |
tree | 2afbc7cb635746b2b6f2a6b6b5c64e9c62777168 /drivers/scsi/libata-core.c | |
parent | 7401abf2f44695ef44eef47d5deba1c20214a063 (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/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 5 |
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, spin_unlock_irqrestore(&ap->host_set->lock, flags); } + /* finish up */ + spin_lock_irqsave(&ap->host_set->lock, flags); + *tf = qc->tf; err_mask = qc->err_mask; @@ -1052,6 +1055,8 @@ unsigned ata_exec_internal(struct ata_port *ap, struct ata_device *dev, ata_port_probe(ap); } + spin_unlock_irqrestore(&ap->host_set->lock, flags); + return err_mask; } |