linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] aio: fix failure to put the file pointer
@ 2018-11-17 14:43 Jens Axboe
  2018-11-17 15:08 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2018-11-17 14:43 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-aio@kvack.org, linux-fsdevel

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>

diff --git a/fs/aio.c b/fs/aio.c
index b36691268b6c..3d9bc81cf500 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;
 		}
 
-- 
Jens Axboe

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] aio: fix failure to put the file pointer
  2018-11-17 14:43 [PATCH v2] aio: fix failure to put the file pointer Jens Axboe
@ 2018-11-17 15:08 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2018-11-17 15:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-aio@kvack.org, linux-fsdevel

On Sat, Nov 17, 2018 at 07:43:42AM -0700, Jens Axboe wrote:
> If the ioprio capability check fails, we return without putting
> the file pointer.

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-18  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-17 14:43 [PATCH v2] aio: fix failure to put the file pointer Jens Axboe
2018-11-17 15:08 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).