aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pagelist.c1
-rw-r--r--fs/nfs/write.c9
2 files changed, 4 insertions, 6 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index d3ff7abcf545..36e902a88ca1 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -314,6 +314,7 @@ nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst,
314 req->wb_index, NFS_PAGE_TAG_DIRTY); 314 req->wb_index, NFS_PAGE_TAG_DIRTY);
315 nfs_list_remove_request(req); 315 nfs_list_remove_request(req);
316 nfs_list_add_request(req, dst); 316 nfs_list_add_request(req, dst);
317 dec_zone_page_state(req->wb_page, NR_FILE_DIRTY);
317 res++; 318 res++;
318 } 319 }
319 } 320 }
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 1aadc138ec4a..bca5734ca9fb 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -496,7 +496,7 @@ nfs_mark_request_dirty(struct nfs_page *req)
496 nfs_list_add_request(req, &nfsi->dirty); 496 nfs_list_add_request(req, &nfsi->dirty);
497 nfsi->ndirty++; 497 nfsi->ndirty++;
498 spin_unlock(&nfsi->req_lock); 498 spin_unlock(&nfsi->req_lock);
499 inc_page_state(nr_dirty); 499 inc_zone_page_state(req->wb_page, NR_FILE_DIRTY);
500 mark_inode_dirty(inode); 500 mark_inode_dirty(inode);
501} 501}
502 502
@@ -524,7 +524,7 @@ nfs_mark_request_commit(struct nfs_page *req)
524 nfs_list_add_request(req, &nfsi->commit); 524 nfs_list_add_request(req, &nfsi->commit);
525 nfsi->ncommit++; 525 nfsi->ncommit++;
526 spin_unlock(&nfsi->req_lock); 526 spin_unlock(&nfsi->req_lock);
527 inc_page_state(nr_unstable); 527 inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
528 mark_inode_dirty(inode); 528 mark_inode_dirty(inode);
529} 529}
530#endif 530#endif
@@ -608,7 +608,6 @@ nfs_scan_dirty(struct inode *inode, struct list_head *dst, unsigned long idx_sta
608 if (nfsi->ndirty != 0) { 608 if (nfsi->ndirty != 0) {
609 res = nfs_scan_lock_dirty(nfsi, dst, idx_start, npages); 609 res = nfs_scan_lock_dirty(nfsi, dst, idx_start, npages);
610 nfsi->ndirty -= res; 610 nfsi->ndirty -= res;
611 sub_page_state(nr_dirty,res);
612 if ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty)) 611 if ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty))
613 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ndirty.\n"); 612 printk(KERN_ERR "NFS: desynchronized value of nfs_i.ndirty.\n");
614 } 613 }
@@ -1393,7 +1392,6 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
1393{ 1392{
1394 struct nfs_write_data *data = calldata; 1393 struct nfs_write_data *data = calldata;
1395 struct nfs_page *req; 1394 struct nfs_page *req;
1396 int res = 0;
1397 1395
1398 dprintk("NFS: %4d nfs_commit_done (status %d)\n", 1396 dprintk("NFS: %4d nfs_commit_done (status %d)\n",
1399 task->tk_pid, task->tk_status); 1397 task->tk_pid, task->tk_status);
@@ -1405,6 +1403,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
1405 while (!list_empty(&data->pages)) { 1403 while (!list_empty(&data->pages)) {
1406 req = nfs_list_entry(data->pages.next); 1404 req = nfs_list_entry(data->pages.next);
1407 nfs_list_remove_request(req); 1405 nfs_list_remove_request(req);
1406 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
1408 1407
1409 dprintk("NFS: commit (%s/%Ld %d@%Ld)", 1408 dprintk("NFS: commit (%s/%Ld %d@%Ld)",
1410 req->wb_context->dentry->d_inode->i_sb->s_id, 1409 req->wb_context->dentry->d_inode->i_sb->s_id,
@@ -1431,9 +1430,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
1431 nfs_mark_request_dirty(req); 1430 nfs_mark_request_dirty(req);
1432 next: 1431 next:
1433 nfs_clear_page_writeback(req); 1432 nfs_clear_page_writeback(req);
1434 res++;
1435 } 1433 }
1436 sub_page_state(nr_unstable,res);
1437} 1434}
1438 1435
1439static const struct rpc_call_ops nfs_commit_ops = { 1436static const struct rpc_call_ops nfs_commit_ops = {