From: David Howells <dhowells@redhat.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: David Howells <dhowells@redhat.com>,
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: Thu, 10 May 2007 10:56:32 +0100 [thread overview]
Message-ID: <27482.1178790992@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <46425C55.6050000@yahoo.com.au>
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.
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.
I suppose I could call SetPageUptodate() in afs_commit_write() instead.
David
next prev parent reply other threads:[~2007-05-10 9:56 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 [this message]
2007-05-11 6:14 ` Nick Piggin
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=27482.1178790992@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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).