From: Nick Piggin <nickpiggin@yahoo.com.au>
To: David Howells <dhowells@redhat.com>
Cc: akpm@osdl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/3] AFS: Implement basic file write support
Date: Fri, 11 May 2007 16:14:39 +1000 [thread overview]
Message-ID: <464409CF.4090203@yahoo.com.au> (raw)
In-Reply-To: <27482.1178790992@warthog.cambridge.redhat.com>
David Howells wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
>
>>Why do you call SetPageUptodate when the page is not up to date?
>>That leaks uninitialised data, AFAIKS.
>
>
> It only seems that way. If afs_prepare_write() is called, but doesn't return
> an error, then afs_commit_write() will be called, and it seems that the copy
> in of the data will be guaranteed not to fail by the caller.
Not only does it seem that way, it is that way :) PG_uptodate is being set
when the page is not uptodate, isn't it?
> Furthermore, afs_prepare_page() will have filled in the missing bits.
>
> And whilst all that is going on, the page lock will be help by the caller, so
> that no-one else can access the partially complete page.
When a page is uptodate in pagecache, the generic read and nopage functions
do not take the page lock. So how are you excluding those?
--
SUSE Labs, Novell Inc.
prev parent reply other threads:[~2007-05-11 6:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 19:43 [PATCH 1/3] AFS: Export a couple of core functions for AFS write support David Howells
2007-05-08 19:44 ` [PATCH 2/3] AFS: AFS fixups David Howells
2007-05-08 19:44 ` [PATCH 3/3] AFS: Implement basic file write support David Howells
2007-05-09 0:00 ` Andrew Morton
2007-05-09 10:25 ` David Howells
2007-05-09 10:41 ` Andrew Morton
2007-05-09 11:07 ` David Howells
2007-05-09 16:28 ` Andrew Morton
2007-05-09 23:42 ` Nick Piggin
2007-05-10 9:56 ` David Howells
2007-05-11 6:14 ` Nick Piggin [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=464409CF.4090203@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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.