All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: viro@zeniv.linux.org.uk, axboe@kernel.dk,
	zohar@linux.vnet.ibm.com, keescook@chromium.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range()
Date: Fri, 15 May 2020 16:12:13 +0000	[thread overview]
Message-ID: <20200515161213.GV11244@42.do-not-panic.com> (raw)
In-Reply-To: <5945f42e08ee037c4d1d0492622defb5904f4850.1589411496.git.skhan@linuxfoundation.org>

On Wed, May 13, 2020 at 05:33:20PM -0600, Shuah Khan wrote:
> Fix ksys_sync_file_range() to avoid fdput() after a failed fdget().
> fdput() doesn't do fput() on this file since FDPUT_FPUT isn't set
> in fd.flags.
> 
> Change it anyway since failed fdget() doesn't require a fdput(). Refine
> the code path a bit for it to read more clearly.
> Reference: 22f96b3808c1 ("fs: add sync_file_range() helper")
> 
> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

  reply	other threads:[~2020-05-15 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 23:33 [PATCH v3 0/2] fs: avoid fdput() after failed fdget() Shuah Khan
2020-05-13 23:33 ` [PATCH v3 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range() Shuah Khan
2020-05-15 16:12   ` Luis Chamberlain [this message]
2020-05-13 23:33 ` [PATCH v3 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd() Shuah Khan
2020-05-15 19:22   ` Mimi Zohar

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=20200515161213.GV11244@42.do-not-panic.com \
    --to=mcgrof@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zohar@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.