Set PG_uptodate in nfs_writepage_sync()
PATCH 1/1 Set PG_uptodate in nfs_writepage_sync()
A patch by Charles Lever ([email protected]) that ensures the PG_uptodate bit gets set if an entire page gets written by nfs_writepage_sync().
fs/nfs/write.c +9 -2
@@ -808,8 +808,15 @@* If wsize is smaller than page size, update and write * page synchronously. */ -if (NFS_SERVER (inode)->wsize <PAGE_CACHE_SIZE ||IS_SYNC (inode)) -return nfs_writepage_sync (file, inode, page, offset, count); +if (NFS_SERVER (inode)->wsize <PAGE_CACHE_SIZE ||IS_SYNC (inode)) { + 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