提交 67ac58ed 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

libata: use flush_work()

(akpm: bypassed maintainers, sorry.  There are other patches which depend on
this)

Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d9ef8b92
...@@ -1316,7 +1316,7 @@ void ata_port_flush_task(struct ata_port *ap) ...@@ -1316,7 +1316,7 @@ void ata_port_flush_task(struct ata_port *ap)
spin_unlock_irqrestore(ap->lock, flags); spin_unlock_irqrestore(ap->lock, flags);
DPRINTK("flush #1\n"); DPRINTK("flush #1\n");
flush_workqueue(ata_wq); flush_work(ata_wq, &ap->port_task.work); /* akpm: seems unneeded */
/* /*
* At this point, if a task is running, it's guaranteed to see * At this point, if a task is running, it's guaranteed to see
...@@ -1327,7 +1327,7 @@ void ata_port_flush_task(struct ata_port *ap) ...@@ -1327,7 +1327,7 @@ void ata_port_flush_task(struct ata_port *ap)
if (ata_msg_ctl(ap)) if (ata_msg_ctl(ap))
ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n", ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n",
__FUNCTION__); __FUNCTION__);
flush_workqueue(ata_wq); flush_work(ata_wq, &ap->port_task.work);
} }
spin_lock_irqsave(ap->lock, flags); spin_lock_irqsave(ap->lock, flags);
...@@ -6475,9 +6475,9 @@ void ata_port_detach(struct ata_port *ap) ...@@ -6475,9 +6475,9 @@ void ata_port_detach(struct ata_port *ap)
/* Flush hotplug task. The sequence is similar to /* Flush hotplug task. The sequence is similar to
* ata_port_flush_task(). * ata_port_flush_task().
*/ */
flush_workqueue(ata_aux_wq); flush_work(ata_aux_wq, &ap->hotplug_task.work); /* akpm: why? */
cancel_delayed_work(&ap->hotplug_task); cancel_delayed_work(&ap->hotplug_task);
flush_workqueue(ata_aux_wq); flush_work(ata_aux_wq, &ap->hotplug_task.work);
skip_eh: skip_eh:
/* remove the associated SCSI host */ /* remove the associated SCSI host */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册