[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <464409CF.4090203@yahoo.com.au>
Date: Fri, 11 May 2007 16:14:39 +1000
From: Nick Piggin <nickpiggin@...oo.com.au>
To: David Howells <dhowells@...hat.com>
CC: akpm@...l.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 3/3] AFS: Implement basic file write support
David Howells wrote:
> Nick Piggin <nickpiggin@...oo.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.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists