1
0
Fork 0

aio: fix failure to put the file pointer

If the ioprio capability check fails, we return without putting
the file pointer.

Fixes: d9a08a9e61 ("fs: Add aio iopriority support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
hifive-unleashed-5.1
Jens Axboe 2018-11-17 07:43:42 -07:00 committed by Al Viro
parent c4b7d1ba7d
commit 53fffe29a9
1 changed files with 1 additions and 0 deletions

View File

@ -1436,6 +1436,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
ret = ioprio_check_cap(iocb->aio_reqprio);
if (ret) {
pr_debug("aio ioprio check cap error: %d\n", ret);
fput(req->ki_filp);
return ret;
}