From: Andrew Morton <akpm@osdl.org>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH]: ufs: ufs_get_locked_patch race fix
Date: Tue, 1 Aug 2006 00:39:58 -0700 [thread overview]
Message-ID: <20060801003958.c628455f.akpm@osdl.org> (raw)
In-Reply-To: <20060801073043.GA17186@rain>
On Tue, 1 Aug 2006 11:30:43 +0400
Evgeniy Dushistov <dushistov@mail.ru> wrote:
> On Mon, Jul 31, 2006 at 11:02:51PM -0700, Andrew Morton wrote:
> > On Mon, 31 Jul 2006 16:57:02 +0400
> > Evgeniy Dushistov <dushistov@mail.ru> wrote:
> >
> > Looks good to me.
> >
> > Is there any need to be checking ->index? Normally we simply use the
> > sequence:
> >
> > lock_page(page);
> > if (page->mapping == NULL)
> > /* truncate got there first */
> >
> > to handle this case.
>
> Yes, I made it in analogy with `find_lock_page' and missed fact
> that if we increment usage counter of page, we have no need to check
> page->index.
OK. find_lock_page() has the splice stuff in it.
> Need another patch?
Is OK, I updated it.
I'm not sure that the `goto repeat' is needed if truncate got there first,
really - if truncate took the page down then it's now outside i_size and
shouldn't be coming back.
If the page _can_ come back then this code is all rather problematic.
Because this means that the page can come back (via an extending write())
one nanosecond after ufs_get_locked_page() returns NULL. Won't the callers
of ufs_get_locked_page() get confused by that?
next prev parent reply other threads:[~2006-08-01 7:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 12:57 [PATCH]: ufs: ufs_get_locked_patch race fix Evgeniy Dushistov
2006-08-01 6:02 ` Andrew Morton
2006-08-01 7:18 ` Nick Piggin
2006-08-01 7:30 ` Evgeniy Dushistov
2006-08-01 7:39 ` Andrew Morton [this message]
2006-08-01 12:00 ` [PATCH]: ufs: ufs_change_blocknr: skip truncated pages Evgeniy Dushistov
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=20060801003958.c628455f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=dushistov@mail.ru \
--cc=linux-fsdevel@vger.kernel.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).