aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-17 13:26:38 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:26 -0400
commitc03b40246123b2ced79e2620d1d2c089bb12369a (patch)
tree59851fd137ee3ef4d7a3f6a5c6953011f45f8f96 /fs/nfs/write.c
parenta50f7951a31d3b976e829250853f89c9d2da32c0 (diff)
NFS: Convert struct nfs_page to use krefs
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 9e7c21da864f..e9404328ac02 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -117,7 +117,7 @@ static struct nfs_page *nfs_page_find_request_locked(struct page *page)
117 if (PagePrivate(page)) { 117 if (PagePrivate(page)) {
118 req = (struct nfs_page *)page_private(page); 118 req = (struct nfs_page *)page_private(page);
119 if (req != NULL) 119 if (req != NULL)
120 atomic_inc(&req->wb_count); 120 kref_get(&req->wb_kref);
121 } 121 }
122 return req; 122 return req;
123} 123}
@@ -398,7 +398,7 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
398 if (PageDirty(req->wb_page)) 398 if (PageDirty(req->wb_page))
399 set_bit(PG_NEED_FLUSH, &req->wb_flags); 399 set_bit(PG_NEED_FLUSH, &req->wb_flags);
400 nfsi->npages++; 400 nfsi->npages++;
401 atomic_inc(&req->wb_count); 401 kref_get(&req->wb_kref);
402 return 0; 402 return 0;
403} 403}
404 404
@@ -531,7 +531,7 @@ static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, u
531 next = req->wb_index + 1; 531 next = req->wb_index + 1;
532 BUG_ON(!NFS_WBACK_BUSY(req)); 532 BUG_ON(!NFS_WBACK_BUSY(req));
533 533
534 atomic_inc(&req->wb_count); 534 kref_get(&req->wb_kref);
535 spin_unlock(&nfsi->req_lock); 535 spin_unlock(&nfsi->req_lock);
536 error = nfs_wait_on_request(req); 536 error = nfs_wait_on_request(req);
537 nfs_release_request(req); 537 nfs_release_request(req);