aio: fix failure to put the file pointer
PATCH v2 1/1 aio: fix failure to put the file pointer
If the ioprio capability check fails, we return without putting the file pointer.
Fixes d9a08a9e616b ("fs: Add aio iopriority support")
Signed-off-by Jens Axboe <[email protected]>
fs/aio.c +1 -0
@@ -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; }
Signature · 1 line
Jens Axboe
Quoted 2 lines · Jens Axboe
If the ioprio capability check fails, we return without putting the file pointer.
Applied.