patch-2.1.128 linux/fs/nfs/read.c
Next file: linux/fs/nfs/write.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Nov 12 01:02:07 1998
- Orig file:
v2.1.127/linux/fs/nfs/read.c
- Orig date:
Tue Mar 10 10:03:34 1998
diff -u --recursive --new-file v2.1.127/linux/fs/nfs/read.c linux/fs/nfs/read.c
@@ -230,6 +230,17 @@
dprintk("NFS: nfs_readpage (%p %ld@%ld)\n",
page, PAGE_SIZE, page->offset);
set_bit(PG_locked, &page->flags);
+
+ /*
+ * Try to flush any pending writes to the file..
+ *
+ * NOTE! Because we own the page lock, there cannot
+ * be any new pending writes generated at this point.
+ */
+ error = nfs_flush_pages(inode, 0, 0, 0);
+ if (error)
+ return error;
+
atomic_inc(&page->count);
if (!IS_SWAPFILE(inode) && !PageError(page) &&
NFS_SERVER(inode)->rsize >= PAGE_SIZE)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov