mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][RFC] AIO: always reinitialize iocb->ki_run_list at the end of aio_run_iocb()
@ 2010-04-27 22:51 Sergey Temerkhanov
  2010-04-28 18:31 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Sergey Temerkhanov @ 2010-04-27 22:51 UTC (permalink / raw)
  To: linux-aio, LKML

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

This patch makes aio_run_iocb() to always reinitialize iocb->ki_run_list (not 
only when iocb->ki_retry() function returns -EIOCBRETRY) so that subsequent 
call of kick_iocb() will succeed.

Regards, Sergey Temerkhanov,
Cifronic ZAO.

[-- Attachment #2: reinit-ki_run_list.patch --]
[-- Type: text/x-patch, Size: 656 bytes --]

diff -r 97344a0f62c9 fs/aio.c
--- a/fs/aio.c	Tue Apr 27 21:18:14 2010 +0400
+++ b/fs/aio.c	Tue Apr 27 21:30:23 2010 +0400
@@ -748,6 +748,9 @@
 out:
 	spin_lock_irq(&ctx->ctx_lock);
 
+	/* will make __queue_kicked_iocb succeed from here on */
+	INIT_LIST_HEAD(&iocb->ki_run_list);
+
 	if (-EIOCBRETRY == ret) {
 		/*
 		 * OK, now that we are done with this iteration
@@ -756,8 +759,6 @@
 		 * "kick" can start the next iteration
 		 */
 
-		/* will make __queue_kicked_iocb succeed from here on */
-		INIT_LIST_HEAD(&iocb->ki_run_list);
 		/* we must queue the next iteration ourselves, if it
 		 * has already been kicked */
 		if (kiocbIsKicked(iocb)) {

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

end of thread, other threads:[~2010-06-27 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-27 22:51 [PATCH][RFC] AIO: always reinitialize iocb->ki_run_list at the end of aio_run_iocb() Sergey Temerkhanov
2010-04-28 18:31 ` Andrew Morton
2010-04-29 22:56   ` Sergey Temerkhanov
2010-05-21 21:47     ` Andrew Morton
2010-05-26 19:38       ` Jeff Moyer
2010-05-27 10:06         ` Sergey Temerkhanov
2010-06-01 21:14           ` Jeff Moyer
2010-06-24 17:31             ` Sergey Temerkhanov
2010-06-27 16:10               ` Jeff Moyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome