Commit 4102986d authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] Set PG_uptodate in nfs_writepage_sync()

A patch by Charles Lever (Charles.Lever@netapp.com) that ensures the
PG_uptodate bit gets set if an entire page gets written by
nfs_writepage_sync().
parent 30bf5c63
...@@ -808,8 +808,15 @@ nfs_updatepage(struct file *file, struct page *page, unsigned int offset, unsign ...@@ -808,8 +808,15 @@ nfs_updatepage(struct file *file, struct page *page, unsigned int offset, unsign
* If wsize is smaller than page size, update and write * If wsize is smaller than page size, update and write
* page synchronously. * page synchronously.
*/ */
if (NFS_SERVER(inode)->wsize < PAGE_CACHE_SIZE || IS_SYNC(inode)) if (NFS_SERVER(inode)->wsize < PAGE_CACHE_SIZE || IS_SYNC(inode)) {
return nfs_writepage_sync(file, inode, page, offset, count); status = nfs_writepage_sync(file, inode, page, offset, count);
if (status > 0) {
if (offset == 0 && status == PAGE_CACHE_SIZE)
SetPageUptodate(page);
return 0;
}
return status;
}
/* /*
* Try to find an NFS request corresponding to this page * Try to find an NFS request corresponding to this page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment