diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-12-03 15:20:14 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-12-03 15:20:14 -0500 |
commit | bb713d6d38f7be4f4e7d790cddb1b076e7da6699 (patch) | |
tree | 8b644138d771cf86599be4c1bd0f5bdcab09d39e /fs/nfs/write.c | |
parent | bb184f3356adbbb1605df2f7c570b4c92231fa3a (diff) |
NFS: use set_page_writeback() in the appropriate places
Ensure that we use set_page_writeback() in the appropriate places
to help the VM in keeping its page radix_tree in sync.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 8f71e766cc5d..3107908e5f3f 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -189,6 +189,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, | |||
189 | (long long)NFS_FILEID(inode), | 189 | (long long)NFS_FILEID(inode), |
190 | count, (long long)(page_offset(page) + offset)); | 190 | count, (long long)(page_offset(page) + offset)); |
191 | 191 | ||
192 | set_page_writeback(page); | ||
192 | nfs_begin_data_update(inode); | 193 | nfs_begin_data_update(inode); |
193 | do { | 194 | do { |
194 | if (count < wsize) | 195 | if (count < wsize) |
@@ -221,6 +222,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, | |||
221 | 222 | ||
222 | io_error: | 223 | io_error: |
223 | nfs_end_data_update(inode); | 224 | nfs_end_data_update(inode); |
225 | end_page_writeback(page); | ||
224 | nfs_writedata_free(wdata); | 226 | nfs_writedata_free(wdata); |
225 | return written ? written : result; | 227 | return written ? written : result; |
226 | } | 228 | } |
@@ -929,7 +931,7 @@ static int nfs_flush_multi(struct list_head *head, struct inode *inode, int how) | |||
929 | atomic_set(&req->wb_complete, requests); | 931 | atomic_set(&req->wb_complete, requests); |
930 | 932 | ||
931 | ClearPageError(page); | 933 | ClearPageError(page); |
932 | SetPageWriteback(page); | 934 | set_page_writeback(page); |
933 | offset = 0; | 935 | offset = 0; |
934 | nbytes = req->wb_bytes; | 936 | nbytes = req->wb_bytes; |
935 | do { | 937 | do { |
@@ -992,7 +994,7 @@ static int nfs_flush_one(struct list_head *head, struct inode *inode, int how) | |||
992 | nfs_list_remove_request(req); | 994 | nfs_list_remove_request(req); |
993 | nfs_list_add_request(req, &data->pages); | 995 | nfs_list_add_request(req, &data->pages); |
994 | ClearPageError(req->wb_page); | 996 | ClearPageError(req->wb_page); |
995 | SetPageWriteback(req->wb_page); | 997 | set_page_writeback(req->wb_page); |
996 | *pages++ = req->wb_page; | 998 | *pages++ = req->wb_page; |
997 | count += req->wb_bytes; | 999 | count += req->wb_bytes; |
998 | } | 1000 | } |