Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Eric Biggers <>
To:, Alexander Viro <>
Cc: Daeho Jeong <>,
Subject: Re: [PATCH v2] vfs: don't unnecessarily clone write access for writable fds
Date: Mon, 29 Jun 2020 09:50:14 -0700	[thread overview]
Message-ID: <20200629165014.GA20492@sol.localdomain> (raw)
In-Reply-To: <>

On Thu, Jun 11, 2020 at 09:05:34AM -0700, Eric Biggers wrote:
> From: Eric Biggers <>
> There's no need for mnt_want_write_file() to increment mnt_writers when
> the file is already open for writing, provided that
> mnt_drop_write_file() is changed to conditionally decrement it.
> We seem to have ended up in the current situation because
> mnt_want_write_file() used to be paired with mnt_drop_write(), due to
> mnt_drop_write_file() not having been added yet.  So originally
> mnt_want_write_file() had to always increment mnt_writers.
> But later mnt_drop_write_file() was added, and all callers of
> mnt_want_write_file() were paired with it.  This makes the compatibility
> between mnt_want_write_file() and mnt_drop_write() no longer necessary.
> Therefore, make __mnt_want_write_file() and __mnt_drop_write_file() skip
> incrementing mnt_writers on files already open for writing.  This
> removes the only caller of mnt_clone_write(), so remove that too.
> Signed-off-by: Eric Biggers <>

Al, any thoughts on this patch?

- Eric

  reply	other threads:[~2020-06-29 20:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 16:05 Eric Biggers
2020-06-29 16:50 ` Eric Biggers [this message]
2020-09-16  3:59   ` Eric Biggers
2020-09-17  0:54     ` Al Viro
2020-09-22 16:41       ` Eric Biggers

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:

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

  git send-email \
    --in-reply-to=20200629165014.GA20492@sol.localdomain \ \ \ \ \ \
    --subject='Re: [PATCH v2] vfs: don'\''t unnecessarily clone write access for writable fds' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).