aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/fs-writeback.c2
-rw-r--r--fs/nfs/pagelist.c1
-rw-r--r--fs/nfs/write.c3
-rw-r--r--fs/proc/proc_misc.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index e9994722f4a3..90e52e677209 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -852,7 +852,7 @@ int __set_page_dirty_buffers(struct page *page)
852 write_lock_irq(&mapping->tree_lock); 852 write_lock_irq(&mapping->tree_lock);
853 if (page->mapping) { /* Race with truncate? */ 853 if (page->mapping) { /* Race with truncate? */
854 if (mapping_cap_account_dirty(mapping)) 854 if (mapping_cap_account_dirty(mapping))
855 inc_page_state(nr_dirty); 855 __inc_zone_page_state(page, NR_FILE_DIRTY);
856 radix_tree_tag_set(&mapping->page_tree, 856 radix_tree_tag_set(&mapping->page_tree,
857 page_index(page), 857 page_index(page),
858 PAGECACHE_TAG_DIRTY); 858 PAGECACHE_TAG_DIRTY);
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 031b27a4bc9a..e5ad10756848 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -464,7 +464,7 @@ void sync_inodes_sb(struct super_block *sb, int wait)
464 .range_start = 0, 464 .range_start = 0,
465 .range_end = LLONG_MAX, 465 .range_end = LLONG_MAX,
466 }; 466 };
467 unsigned long nr_dirty = read_page_state(nr_dirty); 467 unsigned long nr_dirty = global_page_state(NR_FILE_DIRTY);
468 unsigned long nr_unstable = read_page_state(nr_unstable); 468 unsigned long nr_unstable = read_page_state(nr_unstable);
469 469
470 wbc.nr_to_write = nr_dirty + nr_unstable + 470 wbc.nr_to_write = nr_dirty + nr_unstable +
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index d89f6fb3b3a3..26b1fe909377 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -315,6 +315,7 @@ nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst,
315 req->wb_index, NFS_PAGE_TAG_DIRTY); 315 req->wb_index, NFS_PAGE_TAG_DIRTY);
316 nfs_list_remove_request(req); 316 nfs_list_remove_request(req);
317 nfs_list_add_request(req, dst); 317 nfs_list_add_request(req, dst);
318 dec_zone_page_state(req->wb_page, NR_FILE_DIRTY);
318 res++; 319 res++;
319 } 320 }
320 } 321 }
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 8fccb9cb173b..a6d1ca513dde 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -497,7 +497,7 @@ nfs_mark_request_dirty(struct nfs_page *req)
497 nfs_list_add_request(req, &nfsi->dirty); 497 nfs_list_add_request(req, &nfsi->dirty);
498 nfsi->ndirty++; 498 nfsi->ndirty++;
499 spin_unlock(&nfsi->req_lock); 499 spin_unlock(&nfsi->req_lock);
500 inc_page_state(nr_dirty); 500 inc_zone_page_state(req->wb_page, NR_FILE_DIRTY);
501 mark_inode_dirty(inode); 501 mark_inode_dirty(inode);
502} 502}
503 503
@@ -609,7 +609,6 @@ nfs_scan_dirty(struct inode *inode, struct list_head *dst, unsigned long idx_sta
609 if (nfsi->ndirty != 0) { 609 if (nfsi->ndirty != 0) {
610 res = nfs_scan_lock_dirty(nfsi, dst, idx_start, npages); 610 res = nfs_scan_lock_dirty(nfsi, dst, idx_start, npages);
611 nfsi->ndirty -= res; 611 nfsi->ndirty -= res;
612 sub_page_state(nr_dirty,res);
613 if ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty)) 612 if ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty))
614 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ndirty.\n"); 613 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ndirty.\n");
615 } 614 }
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 0eae68f84210..e23717dec3c1 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -190,7 +190,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
190 K(i.freeram-i.freehigh), 190 K(i.freeram-i.freehigh),
191 K(i.totalswap), 191 K(i.totalswap),
192 K(i.freeswap), 192 K(i.freeswap),
193 K(ps.nr_dirty), 193 K(global_page_state(NR_FILE_DIRTY)),
194 K(ps.nr_writeback), 194 K(ps.nr_writeback),
195 K(global_page_state(NR_ANON_PAGES)), 195 K(global_page_state(NR_ANON_PAGES)),
196 K(global_page_state(NR_FILE_MAPPED)), 196 K(global_page_state(NR_FILE_MAPPED)),