Skip to contentSkip to conversation

libata-core: remove akpm's comments

PATCH New Oleg Nesterov 1 participant 1 message Feb 18, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata-core: remove akpm's comments

I have a small hope this patch is correct (compile tested). At least, the code was not correct before this patch. "Cancel and flush" should do "Cancel", and then "flush".

drivers/ata/libata-core.c renamed from drivers/ata/libata-core.c~4_ata +1 -4
@@ -1071,8 +1071,6 @@ void ata_port_flush_task(struct ata_port
 	spin_unlock_irqrestore(ap->lock, flags);
 
 	DPRINTK("flush #1\n");
-	cancel_work_sync(&ap->port_task.work); /* akpm: seems unneeded */
-
 	/*
 	 * At this point, if a task is running, it's guaranteed to see
 	 * the FLUSH flag; thus, it will never queue pio tasks again.
@@ -1082,8 +1080,8 @@ void ata_port_flush_task(struct ata_port
 		if (ata_msg_ctl(ap))
 			ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n",
 					__FUNCTION__);
-		cancel_work_sync(&ap->port_task.work);
 	}
+	cancel_work_sync(&ap->port_task.work);
 
 	spin_lock_irqsave(ap->lock, flags);
 	ap->pflags &= ~ATA_PFLAG_FLUSH_PORT_TASK;
@@ -5889,7 +5887,6 @@ void ata_port_detach(struct ata_port *ap
 	/* Flush hotplug task.  The sequence is similar to
 	 * ata_port_flush_task().
 	 */
-	cancel_work_sync(&ap->hotplug_task.work); /* akpm: why? */
 	cancel_delayed_work(&ap->hotplug_task);
 	cancel_work_sync(&ap->hotplug_task.work);