linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme/host/tcp.c: fix use of time_after()
@ 2019-09-18  0:53 Wunderlich, Mark
  2019-09-18  1:40 ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Wunderlich, Mark @ 2019-09-18  0:53 UTC (permalink / raw)
  To: linux-nvme; +Cc: Sagi Grimberg

nvme/host/tcp.c: fix use of time_after()

From: Mark Wunderlich <mark.wunderlich@intel.com>

The values provided to time_after() call used to terminate
do/while loop were reversed, causing loop to always exit
after single pass.  Believe intent was to give the worker
a 1 msec time quota.

Signed-off-by: Mark Wunderlich <mark.wunderlich@intel.com>
---
 drivers/nvme/host/tcp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 08a2501..8f4a3f84 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1057,7 +1057,7 @@ static void nvme_tcp_io_work(struct work_struct *w)
 		if (!pending)
 			return;
 
-	} while (time_after(jiffies, start)); /* quota is exhausted */
+	} while (time_after(start, jiffies)); /* quota is exhausted */
 
 	queue_work_on(queue->io_cpu, nvme_tcp_wq, &queue->io_work);
 }


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-18 18:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18  0:53 [PATCH] nvme/host/tcp.c: fix use of time_after() Wunderlich, Mark
2019-09-18  1:40 ` Sagi Grimberg
2019-09-18 18:20   ` Wunderlich, Mark
2019-09-18 18:21     ` Bart Van Assche
2019-09-18 18:55     ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).