lkml.org 
[lkml]   [2010]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCHv2 2/3] [RFC] AIO: Add aio_put_req() calls to io_cancel() and aio_cancel_all()
Date
Signed-off-by: Sergey Temerkhanov<temerkhanov@cifronik.ru>

This patch fixes reference counting in aio_cancel_all()
and io_cancel()

diff -r 74c172a99cdb fs/aio.c
--- a/fs/aio.c Tue Mar 16 18:55:59 2010 +0300
+++ b/fs/aio.c Wed Mar 17 17:42:47 2010 +0300
@@ -1036,6 +1036,7 @@
cancel(iocb, &res);
spin_lock_irq(&ctx->ctx_lock);
}
+ __aio_put_req(ctx, iocb);
}
spin_unlock_irq(&ctx->ctx_lock);
}
@@ -1792,6 +1793,7 @@
} else
ret = -EINVAL;

+ aio_put_req(kiocb);
put_ioctx(ctx);

return ret;

\
 
 \ /
  Last update: 2010-05-28 00:43    [W:0.029 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site