aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-17 15:10:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:26 -0400
commit9fd367f0f376ccfb2592eed9be0eece70429894f (patch)
tree9fa7b6570db80dd7025a5c33ebd7c82ca73698a7 /fs
parentc03b40246123b2ced79e2620d1d2c089bb12369a (diff)
NFS cleanup: Rename NFS_PAGE_TAG_WRITEBACK to NFS_PAGE_TAG_LOCKED
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/pagelist.c14
-rw-r--r--fs/nfs/write.c16
2 files changed, 15 insertions, 15 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 257a7f8b2362..23e9dea20902 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -108,29 +108,29 @@ void nfs_unlock_request(struct nfs_page *req)
108} 108}
109 109
110/** 110/**
111 * nfs_set_page_writeback_locked - Lock a request for writeback 111 * nfs_set_page_tag_locked - Tag a request as locked
112 * @req: 112 * @req:
113 */ 113 */
114int nfs_set_page_writeback_locked(struct nfs_page *req) 114static int nfs_set_page_tag_locked(struct nfs_page *req)
115{ 115{
116 struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode); 116 struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
117 117
118 if (!nfs_lock_request(req)) 118 if (!nfs_lock_request(req))
119 return 0; 119 return 0;
120 radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_WRITEBACK); 120 radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
121 return 1; 121 return 1;
122} 122}
123 123
124/** 124/**
125 * nfs_clear_page_writeback - Unlock request and wake up sleepers 125 * nfs_clear_page_tag_locked - Clear request tag and wake up sleepers
126 */ 126 */
127void nfs_clear_page_writeback(struct nfs_page *req) 127void nfs_clear_page_tag_locked(struct nfs_page *req)
128{ 128{
129 struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode); 129 struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
130 130
131 if (req->wb_page != NULL) { 131 if (req->wb_page != NULL) {
132 spin_lock(&nfsi->req_lock); 132 spin_lock(&nfsi->req_lock);
133 radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_WRITEBACK); 133 radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
134 spin_unlock(&nfsi->req_lock); 134 spin_unlock(&nfsi->req_lock);
135 } 135 }
136 nfs_unlock_request(req); 136 nfs_unlock_request(req);
@@ -421,7 +421,7 @@ int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head,
421 idx_start = req->wb_index + 1; 421 idx_start = req->wb_index + 1;
422 if (req->wb_list_head != head) 422 if (req->wb_list_head != head)
423 continue; 423 continue;
424 if (nfs_set_page_writeback_locked(req)) { 424 if (nfs_set_page_tag_locked(req)) {
425 nfs_list_remove_request(req); 425 nfs_list_remove_request(req);
426 nfs_list_add_request(req, dst); 426 nfs_list_add_request(req, dst);
427 res++; 427 res++;
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index e9404328ac02..754066cc9146 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -289,7 +289,7 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
289 BUG(); 289 BUG();
290 } 290 }
291 radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, 291 radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index,
292 NFS_PAGE_TAG_WRITEBACK); 292 NFS_PAGE_TAG_LOCKED);
293 ret = test_bit(PG_NEED_FLUSH, &req->wb_flags); 293 ret = test_bit(PG_NEED_FLUSH, &req->wb_flags);
294 spin_unlock(req_lock); 294 spin_unlock(req_lock);
295 nfs_pageio_add_request(pgio, req); 295 nfs_pageio_add_request(pgio, req);
@@ -524,7 +524,7 @@ static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, u
524 idx_end = idx_start + npages - 1; 524 idx_end = idx_start + npages - 1;
525 525
526 next = idx_start; 526 next = idx_start;
527 while (radix_tree_gang_lookup_tag(&nfsi->nfs_page_tree, (void **)&req, next, 1, NFS_PAGE_TAG_WRITEBACK)) { 527 while (radix_tree_gang_lookup_tag(&nfsi->nfs_page_tree, (void **)&req, next, 1, NFS_PAGE_TAG_LOCKED)) {
528 if (req->wb_index > idx_end) 528 if (req->wb_index > idx_end)
529 break; 529 break;
530 530
@@ -759,7 +759,7 @@ static void nfs_writepage_release(struct nfs_page *req)
759 nfs_inode_remove_request(req); 759 nfs_inode_remove_request(req);
760 } else 760 } else
761 nfs_end_page_writeback(req->wb_page); 761 nfs_end_page_writeback(req->wb_page);
762 nfs_clear_page_writeback(req); 762 nfs_clear_page_tag_locked(req);
763} 763}
764 764
765static inline int flush_task_priority(int how) 765static inline int flush_task_priority(int how)
@@ -888,7 +888,7 @@ out_bad:
888 } 888 }
889 nfs_redirty_request(req); 889 nfs_redirty_request(req);
890 nfs_end_page_writeback(req->wb_page); 890 nfs_end_page_writeback(req->wb_page);
891 nfs_clear_page_writeback(req); 891 nfs_clear_page_tag_locked(req);
892 return -ENOMEM; 892 return -ENOMEM;
893} 893}
894 894
@@ -931,7 +931,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i
931 nfs_list_remove_request(req); 931 nfs_list_remove_request(req);
932 nfs_redirty_request(req); 932 nfs_redirty_request(req);
933 nfs_end_page_writeback(req->wb_page); 933 nfs_end_page_writeback(req->wb_page);
934 nfs_clear_page_writeback(req); 934 nfs_clear_page_tag_locked(req);
935 } 935 }
936 return -ENOMEM; 936 return -ENOMEM;
937} 937}
@@ -1049,7 +1049,7 @@ remove_request:
1049 nfs_end_page_writeback(page); 1049 nfs_end_page_writeback(page);
1050 nfs_inode_remove_request(req); 1050 nfs_inode_remove_request(req);
1051 next: 1051 next:
1052 nfs_clear_page_writeback(req); 1052 nfs_clear_page_tag_locked(req);
1053 } 1053 }
1054} 1054}
1055 1055
@@ -1212,7 +1212,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
1212 nfs_list_remove_request(req); 1212 nfs_list_remove_request(req);
1213 nfs_mark_request_commit(req); 1213 nfs_mark_request_commit(req);
1214 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); 1214 dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
1215 nfs_clear_page_writeback(req); 1215 nfs_clear_page_tag_locked(req);
1216 } 1216 }
1217 return -ENOMEM; 1217 return -ENOMEM;
1218} 1218}
@@ -1265,7 +1265,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
1265 dprintk(" mismatch\n"); 1265 dprintk(" mismatch\n");
1266 nfs_redirty_request(req); 1266 nfs_redirty_request(req);
1267 next: 1267 next:
1268 nfs_clear_page_writeback(req); 1268 nfs_clear_page_tag_locked(req);
1269 } 1269 }
1270} 1270}
1271 1271