aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-11-22 10:44:07 -0500
committerJens Axboe <axboe@kernel.dk>2018-12-04 11:39:06 -0500
commit154989e45fd8de9bfb52bbd6e5ea763e437e54c5 (patch)
treebdd6f554d244c0142238a7306a7eff0ccdfe0e7f /fs/aio.c
parent89d04ec3491bea6d69943b5aed62fdebfad49638 (diff)
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>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 205390c0c1bb..05647d352bf3 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1436,8 +1436,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
1436 ret = ioprio_check_cap(iocb->aio_reqprio); 1436 ret = ioprio_check_cap(iocb->aio_reqprio);
1437 if (ret) { 1437 if (ret) {
1438 pr_debug("aio ioprio check cap error: %d\n", ret); 1438 pr_debug("aio ioprio check cap error: %d\n", ret);
1439 fput(req->ki_filp); 1439 goto out_fput;
1440 return ret;
1441 } 1440 }
1442 1441
1443 req->ki_ioprio = iocb->aio_reqprio; 1442 req->ki_ioprio = iocb->aio_reqprio;
@@ -1446,7 +1445,13 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
1446 1445
1447 ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags); 1446 ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags);
1448 if (unlikely(ret)) 1447 if (unlikely(ret))
1449 fput(req->ki_filp); 1448 goto out_fput;
1449
1450 req->ki_flags &= ~IOCB_HIPRI; /* no one is going to poll for this I/O */
1451 return 0;
1452
1453out_fput:
1454 fput(req->ki_filp);
1450 return ret; 1455 return ret;
1451} 1456}
1452 1457