aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 874972d9427c..605e292501f4 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -55,7 +55,6 @@ struct nfs_write_data *nfs_commitdata_alloc(void)
55 if (p) { 55 if (p) {
56 memset(p, 0, sizeof(*p)); 56 memset(p, 0, sizeof(*p));
57 INIT_LIST_HEAD(&p->pages); 57 INIT_LIST_HEAD(&p->pages);
58 p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE;
59 } 58 }
60 return p; 59 return p;
61} 60}
@@ -75,7 +74,6 @@ struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
75 memset(p, 0, sizeof(*p)); 74 memset(p, 0, sizeof(*p));
76 INIT_LIST_HEAD(&p->pages); 75 INIT_LIST_HEAD(&p->pages);
77 p->npages = pagecount; 76 p->npages = pagecount;
78 p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE;
79 if (pagecount <= ARRAY_SIZE(p->page_array)) 77 if (pagecount <= ARRAY_SIZE(p->page_array))
80 p->pagevec = p->page_array; 78 p->pagevec = p->page_array;
81 else { 79 else {
@@ -1433,15 +1431,17 @@ static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_contr
1433 int flags = FLUSH_SYNC; 1431 int flags = FLUSH_SYNC;
1434 int ret = 0; 1432 int ret = 0;
1435 1433
1436 /* Don't commit yet if this is a non-blocking flush and there are 1434 if (wbc->sync_mode == WB_SYNC_NONE) {
1437 * lots of outstanding writes for this mapping. 1435 /* Don't commit yet if this is a non-blocking flush and there
1438 */ 1436 * are a lot of outstanding writes for this mapping.
1439 if (wbc->sync_mode == WB_SYNC_NONE && 1437 */
1440 nfsi->ncommit <= (nfsi->npages >> 1)) 1438 if (nfsi->ncommit <= (nfsi->npages >> 1))
1441 goto out_mark_dirty; 1439 goto out_mark_dirty;
1442 1440
1443 if (wbc->nonblocking || wbc->for_background) 1441 /* don't wait for the COMMIT response */
1444 flags = 0; 1442 flags = 0;
1443 }
1444
1445 ret = nfs_commit_inode(inode, flags); 1445 ret = nfs_commit_inode(inode, flags);
1446 if (ret >= 0) { 1446 if (ret >= 0) {
1447 if (wbc->sync_mode == WB_SYNC_NONE) { 1447 if (wbc->sync_mode == WB_SYNC_NONE) {