lkml.org 
[lkml]   [2007]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] AFS: Fix afs_prepare_write()
David Howells wrote:
> afs_prepare_write() should not mark a page up to date if it only partially
> fills it in, in expectation of the caller filling in the rest prior to calling
> commit_write(). commit_write(), however, should mark the page up to date.

Acked-by: Nick Piggin <npiggin@suse.de>

>
> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
>
> fs/afs/write.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/fs/afs/write.c b/fs/afs/write.c
> index 28f3751..a03b92a 100644
> --- a/fs/afs/write.c
> +++ b/fs/afs/write.c
> @@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
> _leave(" = %d [prep]", ret);
> return ret;
> }
> - SetPageUptodate(page);
> }
>
> try_again:
> @@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page,
> spin_unlock(&vnode->writeback_lock);
> }
>
> + SetPageUptodate(page);
> set_page_dirty(page);
> -
> if (PageDirty(page))
> _debug("dirtied");
>
>
>


--
SUSE Labs, Novell Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-16 02:27    [W:0.072 / U:2.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site