]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] NFS coherency fix
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Sat, 9 Nov 2002 12:55:00 +0000 (04:55 -0800)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Sat, 9 Nov 2002 12:55:00 +0000 (04:55 -0800)
DOH!!! Somebody clone me a replacement brain: I must have burnt
another fuse.  It turns out the new readpages was evading our
read/write serialization.

This broke things like 'ld' over NFS, which rewrites chunks of
files it has already written.

fs/nfs/read.c

index 3be39535395b1b08681a7b440be9dc8374ecd03f..ef2a516ae607cf69cdaadce2f26243d41c664bba 100644 (file)
@@ -367,9 +367,11 @@ static int
 readpage_async_filler(void *data, struct page *page)
 {
        struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
+       struct inode *inode = page->mapping->host;
        struct nfs_page *new;
-       new = nfs_create_request(nfs_file_cred(desc->filp),
-                               page->mapping->host, page,
+
+       nfs_wb_page(inode, page);
+       new = nfs_create_request(nfs_file_cred(desc->filp), inode, page,
                                0, PAGE_CACHE_SIZE);
        if (IS_ERR(new)) {
                        SetPageError(page);