From: Jens Axboe Date: Sat, 17 Nov 2018 14:43:42 +0000 (-0700) Subject: aio: fix failure to put the file pointer X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=53fffe29a9e664a999dd3787e4428da8c30533e0;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Al Viro --- 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; }