Commit 9101cbe7 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman

aio: clear IOCB_HIPRI

commit 154989e4 upstream.

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: default avatarChristoph Hellwig <hch@lst.de>

IOCB_HIPRI, not RWF_HIPRI.
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 920ecc72
...@@ -1438,8 +1438,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) ...@@ -1438,8 +1438,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;
...@@ -1448,6 +1447,12 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) ...@@ -1448,6 +1447,12 @@ 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))
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); fput(req->ki_filp);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment