Skip to content

Commit

Permalink
AFS: Fix afs_prepare_write()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed May 17, 2007
1 parent 1800782 commit bb33ed6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/afs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
_leave(" = %d [prep]", ret);
return ret;
}
SetPageUptodate(page);
}

try_again:
Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit bb33ed6

Please sign in to comment.