Commit bb713d6d authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent bb184f33
...@@ -189,6 +189,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, ...@@ -189,6 +189,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode,
(long long)NFS_FILEID(inode), (long long)NFS_FILEID(inode),
count, (long long)(page_offset(page) + offset)); count, (long long)(page_offset(page) + offset));
set_page_writeback(page);
nfs_begin_data_update(inode); nfs_begin_data_update(inode);
do { do {
if (count < wsize) if (count < wsize)
...@@ -221,6 +222,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, ...@@ -221,6 +222,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode,
io_error: io_error:
nfs_end_data_update(inode); nfs_end_data_update(inode);
end_page_writeback(page);
nfs_writedata_free(wdata); nfs_writedata_free(wdata);
return written ? written : result; return written ? written : result;
} }
...@@ -929,7 +931,7 @@ static int nfs_flush_multi(struct list_head *head, struct inode *inode, int how) ...@@ -929,7 +931,7 @@ static int nfs_flush_multi(struct list_head *head, struct inode *inode, int how)
atomic_set(&req->wb_complete, requests); atomic_set(&req->wb_complete, requests);
ClearPageError(page); ClearPageError(page);
SetPageWriteback(page); set_page_writeback(page);
offset = 0; offset = 0;
nbytes = req->wb_bytes; nbytes = req->wb_bytes;
do { do {
...@@ -992,7 +994,7 @@ static int nfs_flush_one(struct list_head *head, struct inode *inode, int how) ...@@ -992,7 +994,7 @@ static int nfs_flush_one(struct list_head *head, struct inode *inode, int how)
nfs_list_remove_request(req); nfs_list_remove_request(req);
nfs_list_add_request(req, &data->pages); nfs_list_add_request(req, &data->pages);
ClearPageError(req->wb_page); ClearPageError(req->wb_page);
SetPageWriteback(req->wb_page); set_page_writeback(req->wb_page);
*pages++ = req->wb_page; *pages++ = req->wb_page;
count += req->wb_bytes; count += req->wb_bytes;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment