mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Set PG_uptodate in nfs_writepage_sync()
@ 2002-07-28 15:24 Trond Myklebust
  0 siblings, 0 replies; only message in thread
From: Trond Myklebust @ 2002-07-28 15:24 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel, NFS maillist


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().

diff -u --recursive --new-file linux-2.5.29/fs/nfs/write.c linux-2.5.29-noac/fs/nfs/write.c
--- linux-2.5.29/fs/nfs/write.c	Thu Jul  4 18:17:16 2002
+++ linux-2.5.29-noac/fs/nfs/write.c	Sat Jul 27 17:28:29 2002
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-28 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-28 15:24 [PATCH] Set PG_uptodate in nfs_writepage_sync() Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®