lkml.org 
[lkml]   [2010]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][RFC] AIO: always reinitialize iocb->ki_run_list at the end of aio_run_iocb()
Date
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.
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)) {
\
 
 \ /
  Last update: 2010-04-28 00:59    [W:0.073 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site