Re: [PATCH 26/32] aio: refactor read/write iocb setup

2018-01-11 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:19:53PM -0500, Jeff Moyer wrote: > > +static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) > > +{ > > + int ret; > > + > > + req->ki_filp = fget(iocb->aio_fildes); > > + if (unlikely(!req->ki_filp)) > > + return -EBADF; > > + req->ki_complete =

Re: [PATCH 26/32] aio: refactor read/write iocb setup

2018-01-11 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 04:19:53PM -0500, Jeff Moyer wrote: > > +static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) > > +{ > > + int ret; > > + > > + req->ki_filp = fget(iocb->aio_fildes); > > + if (unlikely(!req->ki_filp)) > > + return -EBADF; > > + req->ki_complete =

Re: [PATCH 26/32] aio: refactor read/write iocb setup

2018-01-10 Thread Jeff Moyer
Christoph Hellwig writes: > Don't reference the kiocb structure from the common aio code, and move > any use of it into helper specific to the read/write path. This is in > preparation for aio_poll support that wants to use the space for different > fields. > > Signed-off-by:

Re: [PATCH 26/32] aio: refactor read/write iocb setup

2018-01-10 Thread Jeff Moyer
Christoph Hellwig writes: > Don't reference the kiocb structure from the common aio code, and move > any use of it into helper specific to the read/write path. This is in > preparation for aio_poll support that wants to use the space for different > fields. > > Signed-off-by: Christoph Hellwig

[PATCH 26/32] aio: refactor read/write iocb setup

2018-01-10 Thread Christoph Hellwig
Don't reference the kiocb structure from the common aio code, and move any use of it into helper specific to the read/write path. This is in preparation for aio_poll support that wants to use the space for different fields. Signed-off-by: Christoph Hellwig --- fs/aio.c | 172

[PATCH 26/32] aio: refactor read/write iocb setup

2018-01-10 Thread Christoph Hellwig
Don't reference the kiocb structure from the common aio code, and move any use of it into helper specific to the read/write path. This is in preparation for aio_poll support that wants to use the space for different fields. Signed-off-by: Christoph Hellwig --- fs/aio.c | 172