[PATCH] fs/nfs, kernel 2.3.35 (and others including current)

From: Jim Studt (jim@federated.com)
Date: Wed Jan 12 2000 - 14:46:44 EST


The msync() call fails on NFS filesystems.

I can only test this on 2.3.35 (ARM port lag) but visual inspection
shows that it is still present in 2.3.39.

Apparently the inode->i_op->writepage functions are now supposed to
return 0 for success. The nfs_writepage() function however returns
the size of the operation on success, PAGE_SIZE.

This starts propagating an error code from do_write_page()
in mm/filemap.c that eventually pops out in msync().

The following patch fixes it.

--- linux-2.3.35/fs/nfs/write.c Wed Jan 12 13:10:57 2000
+++ linux/fs/nfs/write.c Wed Jan 12 13:30:32 2000
@@ -416,7 +416,9 @@
 int
 nfs_writepage(struct dentry * dentry, struct page *page)
 {
- return nfs_writepage_sync(dentry, dentry->d_inode, page, 0, PAGE_SIZE);
+ int result = nfs_writepage_sync(dentry, dentry->d_inode, page, 0, PAGE_SIZE);
+ if ( result == PAGE_SIZE) return 0;
+ return result;
 }
 
 /*

-- 
                                     Jim Studt, President
                                     The Federated Software Group, Inc.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:21 EST