Thread (11 messages) flat view 11 messages, 3 authors, 2007-05-11

Re: [PATCH 3/3] AFS: Implement basic file write support

From: David Howells <dhowells@redhat.com>
Date: 2007-05-10 09:56:32
Also in: linux-fsdevel, lkml

Nick Piggin [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help