Skip to content

Commit 53fffe2

Browse files
axboeAl Viro
authored andcommitted
aio: fix failure to put the file pointer
If the ioprio capability check fails, we return without putting the file pointer. Fixes: d9a08a9 ("fs: Add aio iopriority support") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c4b7d1b commit 53fffe2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/aio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
14361436
ret = ioprio_check_cap(iocb->aio_reqprio);
14371437
if (ret) {
14381438
pr_debug("aio ioprio check cap error: %d\n", ret);
1439+
fput(req->ki_filp);
14391440
return ret;
14401441
}
14411442

0 commit comments

Comments
 (0)