]> git.baikalelectronics.ru Git - kernel.git/commit
[libata] fix PIO completion race
authorJeff Garzik <jgarzik@pobox.com>
Fri, 16 Sep 2005 10:01:48 +0000 (06:01 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 16 Sep 2005 10:01:48 +0000 (06:01 -0400)
commita55970037d09ea610bf168e37fc85f8a9bc66dbf
treefd0a4a8df9eec8b22d1ea9f18443dfc2e32e80eb
parent8efef288d0caf8e8e464885c42679095fa789801
[libata] fix PIO completion race

Make sure we that completion is the final action we take; prior to this
change, another CPU may have changed ap->pio_task_state before we tested
it a final time.

Spotted by, and original patch by Albert Lee @ IBM.

Also includes a minor optimization:  eliminate a ton of unnecessary
queue_work() calls, simply by jumping to the beginning of the FSM
function ata_pio_task().
drivers/scsi/libata-core.c