Skip to content

Commit

Permalink
[PATCH] libata: hold host_set lock while finishing internal qc
Browse files Browse the repository at this point in the history
Hold host_set lock while finishing internal qc.

Signed-off-by: Tejun Heo <htejun@gmail.com>
  • Loading branch information
Tejun Heo committed May 15, 2006
1 parent 7401abf commit 1586930
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down

0 comments on commit 1586930

Please sign in to comment.