From: Jamie Lokier <jamie@shareable.org>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/locks.c fcntl_setlease did not check if a file was opened for writing before granting a read lease
Date: Wed, 3 Dec 2003 02:02:40 +0000 [thread overview]
Message-ID: <20031203020240.GC27306@mail.shareable.org> (raw)
In-Reply-To: <6uwu9flcdq.fsf@zork.zork.net>
Sean Neakums wrote:
> > if ((arg == F_RDLCK)
> > && ((atomic_read(&inode->i_writer_count) != 0)))
> >
> > You'll also need to modify all the places where that needs to be
> > maintained.
>
> Looking at 2.6.0-test11, it seems that its struct inode has such a
> field, albeit named i_writecount. Commentary from fs/namei.c:
Cool. At a glance, it looks like deny_write_access() can be used to
handle the F_RDLCK case.
(It would also be nice to have some way of blocking until the lease can
be taken, but even the F_WRLCK case doesn't offer that at the moment).
-- Jamie
prev parent reply other threads:[~2003-12-03 2:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-27 16:35 [PATCH] fs/locks.c fcntl_setlease did not check if a file was opened for writing before granting a read lease Joseph D. Wagner
2003-11-27 16:50 ` Jamie Lokier
2003-11-27 17:45 ` Nikita Danilov
2003-11-27 18:03 ` Jamie Lokier
2003-11-27 8:49 ` Joseph D. Wagner
2003-11-28 1:15 ` Jamie Lokier
2003-12-02 10:53 ` Sean Neakums
2003-12-03 2:02 ` Jamie Lokier [this message]
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=20031203020240.GC27306@mail.shareable.org \
--to=jamie@shareable.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).