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

From: Christoph Hellwig
Date: Thu Jan 11 2018 - 08:38:39 EST


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 = aio_complete_rw;
> > + req->ki_flags = 0;
>
> The above assignment seems superfluous...

Thanks, fixed.