NFS cleanup: Rename NFS_PAGE_TAG_WRITEBACK to NFS_PAGE_TAG_LOCKED
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 17 Jun 2007 19:10:24 +0000 (15:10 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:26 +0000 (23:40 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pagelist.c
fs/nfs/write.c
include/linux/nfs_page.h

index 257a7f8b236226a2bdbe9ff37035ccc3e76979af..23e9dea209021826ce69f7c10420c959bed2309a 100644 (file)
@@ -108,29 +108,29 @@ void nfs_unlock_request(struct nfs_page *req)
 }
 
 /**
- * nfs_set_page_writeback_locked - Lock a request for writeback
+ * nfs_set_page_tag_locked - Tag a request as locked
  * @req:
  */
-int nfs_set_page_writeback_locked(struct nfs_page *req)
+static int nfs_set_page_tag_locked(struct nfs_page *req)
 {
        struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
 
        if (!nfs_lock_request(req))
                return 0;
-       radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_WRITEBACK);
+       radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
        return 1;
 }
 
 /**
- * nfs_clear_page_writeback - Unlock request and wake up sleepers
+ * nfs_clear_page_tag_locked - Clear request tag and wake up sleepers
  */
-void nfs_clear_page_writeback(struct nfs_page *req)
+void nfs_clear_page_tag_locked(struct nfs_page *req)
 {
        struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
 
        if (req->wb_page != NULL) {
                spin_lock(&nfsi->req_lock);
-               radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_WRITEBACK);
+               radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
                spin_unlock(&nfsi->req_lock);
        }
        nfs_unlock_request(req);
@@ -421,7 +421,7 @@ int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head,
                        idx_start = req->wb_index + 1;
                        if (req->wb_list_head != head)
                                continue;
-                       if (nfs_set_page_writeback_locked(req)) {
+                       if (nfs_set_page_tag_locked(req)) {
                                nfs_list_remove_request(req);
                                nfs_list_add_request(req, dst);
                                res++;
index e9404328ac02f8ed8179580e748949e07507ffc7..754066cc9146dcbbae2f62294fab3e0e0ccdc2ae 100644 (file)
@@ -289,7 +289,7 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
                BUG();
        }
        radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index,
-                       NFS_PAGE_TAG_WRITEBACK);
+                       NFS_PAGE_TAG_LOCKED);
        ret = test_bit(PG_NEED_FLUSH, &req->wb_flags);
        spin_unlock(req_lock);
        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
                idx_end = idx_start + npages - 1;
 
        next = idx_start;
-       while (radix_tree_gang_lookup_tag(&nfsi->nfs_page_tree, (void **)&req, next, 1, NFS_PAGE_TAG_WRITEBACK)) {
+       while (radix_tree_gang_lookup_tag(&nfsi->nfs_page_tree, (void **)&req, next, 1, NFS_PAGE_TAG_LOCKED)) {
                if (req->wb_index > idx_end)
                        break;
 
@@ -759,7 +759,7 @@ static void nfs_writepage_release(struct nfs_page *req)
                nfs_inode_remove_request(req);
        } else
                nfs_end_page_writeback(req->wb_page);
-       nfs_clear_page_writeback(req);
+       nfs_clear_page_tag_locked(req);
 }
 
 static inline int flush_task_priority(int how)
@@ -888,7 +888,7 @@ out_bad:
        }
        nfs_redirty_request(req);
        nfs_end_page_writeback(req->wb_page);
-       nfs_clear_page_writeback(req);
+       nfs_clear_page_tag_locked(req);
        return -ENOMEM;
 }
 
@@ -931,7 +931,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i
                nfs_list_remove_request(req);
                nfs_redirty_request(req);
                nfs_end_page_writeback(req->wb_page);
-               nfs_clear_page_writeback(req);
+               nfs_clear_page_tag_locked(req);
        }
        return -ENOMEM;
 }
@@ -1049,7 +1049,7 @@ remove_request:
                nfs_end_page_writeback(page);
                nfs_inode_remove_request(req);
        next:
-               nfs_clear_page_writeback(req);
+               nfs_clear_page_tag_locked(req);
        }
 }
 
@@ -1212,7 +1212,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
                nfs_list_remove_request(req);
                nfs_mark_request_commit(req);
                dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
-               nfs_clear_page_writeback(req);
+               nfs_clear_page_tag_locked(req);
        }
        return -ENOMEM;
 }
@@ -1265,7 +1265,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
                dprintk(" mismatch\n");
                nfs_redirty_request(req);
        next:
-               nfs_clear_page_writeback(req);
+               nfs_clear_page_tag_locked(req);
        }
 }
 
index c780e7e39f991e9c598c8ecf7f975de431bc6534..042434c39b7e90f9bc8cd9eb04b25be0b6e547d3 100644 (file)
@@ -21,7 +21,7 @@
 /*
  * Valid flags for the radix tree
  */
-#define NFS_PAGE_TAG_WRITEBACK 0
+#define NFS_PAGE_TAG_LOCKED    0
 
 /*
  * Valid flags for a dirty buffer
@@ -84,8 +84,7 @@ extern        void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
 extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t);
 extern  int nfs_wait_on_request(struct nfs_page *);
 extern void nfs_unlock_request(struct nfs_page *req);
-extern  int nfs_set_page_writeback_locked(struct nfs_page *req);
-extern  void nfs_clear_page_writeback(struct nfs_page *req);
+extern  void nfs_clear_page_tag_locked(struct nfs_page *req);
 
 
 /*