diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1ade11d1ba07..f333848fd3be 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -415,7 +415,7 @@ nfs_dirty_request(struct nfs_page *req) | |||
415 | 415 | ||
416 | if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags)) | 416 | if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags)) |
417 | return 0; | 417 | return 0; |
418 | return !PageWriteback(req->wb_page); | 418 | return !PageWriteback(page); |
419 | } | 419 | } |
420 | 420 | ||
421 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 421 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
@@ -739,12 +739,13 @@ int nfs_updatepage(struct file *file, struct page *page, | |||
739 | } | 739 | } |
740 | 740 | ||
741 | status = nfs_writepage_setup(ctx, page, offset, count); | 741 | status = nfs_writepage_setup(ctx, page, offset, count); |
742 | __set_page_dirty_nobuffers(page); | 742 | if (status < 0) |
743 | nfs_set_pageerror(page); | ||
744 | else | ||
745 | __set_page_dirty_nobuffers(page); | ||
743 | 746 | ||
744 | dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n", | 747 | dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n", |
745 | status, (long long)i_size_read(inode)); | 748 | status, (long long)i_size_read(inode)); |
746 | if (status < 0) | ||
747 | nfs_set_pageerror(page); | ||
748 | return status; | 749 | return status; |
749 | } | 750 | } |
750 | 751 | ||