Re: [PATCH 1/8] aio: make sure file is pinned

From: Al Viro
Date: Sun Mar 10 2019 - 03:07:30 EST


On Fri, Mar 08, 2019 at 03:36:50AM +0000, Al Viro wrote:

> See vfs.git#work.aio; the crucial bits are in these commits:
> keep io_event in aio_kiocb
> get rid of aio_complete() res/res2 arguments
> move aio_complete() to final iocb_put(), try to fix aio_poll() logics
> The first two are preparations, the last is where the fixes (hopefully)
> happen.

OK, refactored, cleaned up and force-pushed. Current state:
Al Viro (7):
keep io_event in aio_kiocb
aio: store event at final iocb_put()
Fix aio_poll() races
make aio_read()/aio_write() return int
move dropping ->ki_eventfd into iocb_destroy()
deal with get_reqs_available() in aio_get_req() itself
aio: move sanity checks and request allocation to io_submit_one()

Linus Torvalds (1):
pin iocb through aio.

fs/aio.c | 327 ++++++++++++++++++++++++++++-----------------------------------
1 file changed, 146 insertions(+), 181 deletions(-)