diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index af344a158e01..b853959d964d 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -191,8 +191,6 @@ static int nfs_writepage_setup(struct nfs_open_context *ctx, struct page *page, | |||
191 | } | 191 | } |
192 | /* Update file length */ | 192 | /* Update file length */ |
193 | nfs_grow_file(page, offset, count); | 193 | nfs_grow_file(page, offset, count); |
194 | /* Set the PG_uptodate flag? */ | ||
195 | nfs_mark_uptodate(page, offset, count); | ||
196 | nfs_unlock_request(req); | 194 | nfs_unlock_request(req); |
197 | return 0; | 195 | return 0; |
198 | } | 196 | } |
@@ -751,7 +749,12 @@ int nfs_updatepage(struct file *file, struct page *page, | |||
751 | static void nfs_writepage_release(struct nfs_page *req) | 749 | static void nfs_writepage_release(struct nfs_page *req) |
752 | { | 750 | { |
753 | 751 | ||
754 | if (PageError(req->wb_page) || !nfs_reschedule_unstable_write(req)) { | 752 | if (PageError(req->wb_page)) { |
753 | nfs_end_page_writeback(req->wb_page); | ||
754 | nfs_inode_remove_request(req); | ||
755 | } else if (!nfs_reschedule_unstable_write(req)) { | ||
756 | /* Set the PG_uptodate flag */ | ||
757 | nfs_mark_uptodate(req->wb_page, req->wb_pgbase, req->wb_bytes); | ||
755 | nfs_end_page_writeback(req->wb_page); | 758 | nfs_end_page_writeback(req->wb_page); |
756 | nfs_inode_remove_request(req); | 759 | nfs_inode_remove_request(req); |
757 | } else | 760 | } else |
@@ -1039,6 +1042,8 @@ static void nfs_writeback_done_full(struct rpc_task *task, void *calldata) | |||
1039 | dprintk(" marked for commit\n"); | 1042 | dprintk(" marked for commit\n"); |
1040 | goto next; | 1043 | goto next; |
1041 | } | 1044 | } |
1045 | /* Set the PG_uptodate flag? */ | ||
1046 | nfs_mark_uptodate(page, req->wb_pgbase, req->wb_bytes); | ||
1042 | dprintk(" OK\n"); | 1047 | dprintk(" OK\n"); |
1043 | remove_request: | 1048 | remove_request: |
1044 | nfs_end_page_writeback(page); | 1049 | nfs_end_page_writeback(page); |
@@ -1249,6 +1254,9 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata) | |||
1249 | * returned by the server against all stored verfs. */ | 1254 | * returned by the server against all stored verfs. */ |
1250 | if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) { | 1255 | if (!memcmp(req->wb_verf.verifier, data->verf.verifier, sizeof(data->verf.verifier))) { |
1251 | /* We have a match */ | 1256 | /* We have a match */ |
1257 | /* Set the PG_uptodate flag */ | ||
1258 | nfs_mark_uptodate(req->wb_page, req->wb_pgbase, | ||
1259 | req->wb_bytes); | ||
1252 | nfs_inode_remove_request(req); | 1260 | nfs_inode_remove_request(req); |
1253 | dprintk(" OK\n"); | 1261 | dprintk(" OK\n"); |
1254 | goto next; | 1262 | goto next; |