From: Al Viro <viro@zeniv.linux.org.uk>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] locks: fix TOCTOU race when granting write lease
Date: Tue, 16 Aug 2022 04:18:19 +0100 [thread overview]
Message-ID: <YvsMe33iUtXCKT8L@ZenIV> (raw)
In-Reply-To: <CAOQ4uxgWNQEznKQwyJOkY5pRmyOZqf-07kwBFa4O5kL98kAYkA@mail.gmail.com>
On Mon, Aug 15, 2022 at 10:18:21AM +0300, Amir Goldstein wrote:
> > > +static inline void put_file_access(struct file *file)
> > > +{
> > > + if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) {
> > > + i_readcount_dec(file->f_inode);
> > > + } else if (file->f_mode & FMODE_WRITER) {
> > > + put_write_access(file->f_inode);
> > > + __mnt_drop_write(file->f_path.mnt);
> > > + }
> > > +}
> >
> > What's the point of having it in linux/fs.h instead of internal.h?
>
> No reason. Overlooked.
> Do you need me to re-send or will you move it to internal.h yourself?
Resend, please...
next prev parent reply other threads:[~2022-08-16 6:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-14 15:23 [PATCH] locks: fix TOCTOU race when granting write lease Amir Goldstein
2022-08-14 17:57 ` Al Viro
2022-08-15 7:18 ` Amir Goldstein
2022-08-16 3:18 ` Al Viro [this message]
2022-08-15 11:21 ` Jeff Layton
2022-08-16 14:03 ` Amir Goldstein
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=YvsMe33iUtXCKT8L@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=amir73il@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.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 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.