summaryrefslogtreecommitdiff
path: root/fs/aio.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-17 17:43:42 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-11-17 18:05:07 +0300
commit53fffe29a9e664a999dd3787e4428da8c30533e0 (patch)
treee5ffef375a649e60652f82da033e808663c66bf1 /fs/aio.c
parentc4b7d1ba7d263b74bb72e9325262a67139605cde (diff)
downloadlinux-53fffe29a9e664a999dd3787e4428da8c30533e0.tar.xz
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 <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 301e6314183b..97f983592925 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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;
}