2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 17:53:56 +08:00

aio: clear IOCB_HIPRI

No one is going to poll for aio (yet), so we must clear the HIPRI
flag, as we would otherwise send it down the poll queues, where no
one will be polling for completions.

Signed-off-by: Christoph Hellwig <hch@lst.de>

IOCB_HIPRI, not RWF_HIPRI.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2018-11-22 16:44:07 +01:00 committed by Jens Axboe
parent 89d04ec349
commit 154989e45f

View File

@ -1436,8 +1436,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
ret = ioprio_check_cap(iocb->aio_reqprio); ret = ioprio_check_cap(iocb->aio_reqprio);
if (ret) { if (ret) {
pr_debug("aio ioprio check cap error: %d\n", ret); pr_debug("aio ioprio check cap error: %d\n", ret);
fput(req->ki_filp); goto out_fput;
return ret;
} }
req->ki_ioprio = iocb->aio_reqprio; req->ki_ioprio = iocb->aio_reqprio;
@ -1446,7 +1445,13 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags); ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags);
if (unlikely(ret)) if (unlikely(ret))
fput(req->ki_filp); goto out_fput;
req->ki_flags &= ~IOCB_HIPRI; /* no one is going to poll for this I/O */
return 0;
out_fput:
fput(req->ki_filp);
return ret; return ret;
} }