Skip to content

Commit

Permalink
aio: fix failure to put the file pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe authored and Al Viro committed Nov 17, 2018
1 parent c4b7d1b commit 53fffe2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 53fffe2

Please sign in to comment.