aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/write.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index eea2d2b5278c..ee6fcdecb871 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -188,6 +188,7 @@ static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page,
188 } 188 }
189 /* Update file length */ 189 /* Update file length */
190 nfs_grow_file(page, offset, count); 190 nfs_grow_file(page, offset, count);
191 nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes);
191 nfs_clear_page_tag_locked(req); 192 nfs_clear_page_tag_locked(req);
192 return 0; 193 return 0;
193} 194}
@@ -743,12 +744,7 @@ int nfs_updatepage(struct file *file, struct page *page,
743static void nfs_writepage_release(struct nfs_page *req) 744static void nfs_writepage_release(struct nfs_page *req)
744{ 745{
745 746
746 if (PageError(req->wb_page)) { 747 if (PageError(req->wb_page) || !nfs_reschedule_unstable_write(req)) {
747 nfs_end_page_writeback(req->wb_page);
748 nfs_inode_remove_request(req);
749 } else if (!nfs_reschedule_unstable_write(req)) {
750 /* Set the PG_uptodate flag */
751 nfs_mark_uptodate(req->wb_page, req->wb_pgbase, req->wb_bytes);
752 nfs_end_page_writeback(req->wb_page); 748 nfs_end_page_writeback(req->wb_page);
753 nfs_inode_remove_request(req); 749 nfs_inode_remove_request(req);
754 } else 750 } else
@@ -1069,8 +1065,6 @@ static void nfs_writeback_release_full(void *calldata)
1069 dprintk(" marked for commit\n"); 1065 dprintk(" marked for commit\n");
1070 goto next; 1066 goto next;
1071 } 1067 }
1072 /* Set the PG_uptodate flag? */
1073 nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes);
1074 dprintk(" OK\n"); 1068 dprintk(" OK\n");
1075remove_request: 1069remove_request:
1076 nfs_end_page_writeback(page); 1070 nfs_end_page_writeback(page);
@@ -1309,9 +1303,6 @@ static void nfs_commit_release(void *calldata)
1309 * returned by the server against all stored verfs. */ 1303 * returned by the server against all stored verfs. */
1310 if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) { 1304 if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) {
1311 /* We have a match */ 1305 /* We have a match */
1312 /* Set the PG_uptodate flag */
1313 nfs_mark_uptodate(req->wb_page, req->wb_pgbase,
1314 req->wb_bytes);
1315 nfs_inode_remove_request(req); 1306 nfs_inode_remove_request(req);
1316 dprintk(" OK\n"); 1307 dprintk(" OK\n");
1317 goto next; 1308 goto next;