NFS: Fix up the dirty page accounting
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 5 Dec 2006 05:36:09 +0000 (00:36 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 6 Dec 2006 15:46:41 +0000 (10:46 -0500)
There is now no reason to account for the dirty pages in the NFS code,
since the VM code will now do it for us via __set_page_dirty_nobuffers(),
and set_page_writeback().

We still need to keep the accounting of stable writes, though.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pagelist.c
fs/nfs/write.c

index e046c9b6a9dd201315b40e2e4532f414e906fdb4..47ae2b4dd1d4877bd30f14c299a61ba8cafa8e22 100644 (file)
@@ -331,7 +331,6 @@ long nfs_scan_dirty(struct address_space *mapping,
                        nfsi->ndirty--;
                        nfs_list_remove_request(req);
                        nfs_list_add_request(req, dst);
-                       dec_zone_page_state(req->wb_page, NR_FILE_DIRTY);
                        res++;
                        if (res == LONG_MAX)
                                goto out;
index a4c9df67a3aea27b0596593b4ff96cf8a0bd490d..9624aecab9b5d33eaeac77ad32d8f47ebd7adb81 100644 (file)
@@ -440,7 +440,6 @@ nfs_mark_request_dirty(struct nfs_page *req)
        nfs_list_add_request(req, &nfsi->dirty);
        nfsi->ndirty++;
        spin_unlock(&nfsi->req_lock);
-       inc_zone_page_state(req->wb_page, NR_FILE_DIRTY);
        mark_inode_dirty(inode);
 }