mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>,
	Tejun Heo <htejun@gmail.com>, Jeff Garzik <jeff@garzik.org>,
	Alan Cox <alan@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] libata-core: remove akpm's comments
Date: Mon, 19 Feb 2007 02:08:25 +0300	[thread overview]
Message-ID: <20070218230825.GA6086@tv-sign.ru> (raw)

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".

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- WQ/drivers/ata/libata-core.c~4_ata	2007-02-18 22:56:47.000000000 +0300
+++ WQ/drivers/ata/libata-core.c	2007-02-19 02:02:06.000000000 +0300
@@ -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);
 


                 reply	other threads:[~2007-02-18 23:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070218230825.GA6086@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®