Linux filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jens Axboe <axboe@kernel.dk>
Cc: "linux-aio@kvack.org" <linux-aio@kvack.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] aio: fix failure to put the file pointer
Date: Sat, 17 Nov 2018 14:40:10 +0000	[thread overview]
Message-ID: <20181117144010.GH32577@ZenIV.linux.org.uk> (raw)
In-Reply-To: <80eae85d-c307-71fb-bdfe-5a38236fbf87@kernel.dk>

On Sat, Nov 17, 2018 at 07:37:44AM -0700, Jens Axboe wrote:
> 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..9075571e673f 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -1436,7 +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);
> -			return ret;
> +			goto err;

Better an explicit fput() here, IMO...

  reply	other threads:[~2018-11-18  0:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 14:37 [PATCH] aio: fix failure to put the file pointer Jens Axboe
2018-11-17 14:40 ` Al Viro [this message]
2018-11-17 14:43   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181117144010.GH32577@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=axboe@kernel.dk \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox