aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 8d2642f24b8f..f56dae5216f4 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -126,12 +126,13 @@ static int nfs_set_page_tag_locked(struct nfs_page *req)
126 */ 126 */
127void nfs_clear_page_tag_locked(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 inode *inode = req->wb_context->path.dentry->d_inode;
130 struct nfs_inode *nfsi = NFS_I(inode);
130 131
131 if (req->wb_page != NULL) { 132 if (req->wb_page != NULL) {
132 spin_lock(&nfsi->req_lock); 133 spin_lock(&inode->i_lock);
133 radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED); 134 radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
134 spin_unlock(&nfsi->req_lock); 135 spin_unlock(&inode->i_lock);
135 } 136 }
136 nfs_unlock_request(req); 137 nfs_unlock_request(req);
137} 138}
@@ -390,7 +391,7 @@ void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *desc, pgoff_t index)
390 * If the number of requests is set to 0, the entire address_space 391 * If the number of requests is set to 0, the entire address_space
391 * starting at index idx_start, is scanned. 392 * starting at index idx_start, is scanned.
392 * The requests are *not* checked to ensure that they form a contiguous set. 393 * The requests are *not* checked to ensure that they form a contiguous set.
393 * You must be holding the inode's req_lock when calling this function 394 * You must be holding the inode's i_lock when calling this function
394 */ 395 */
395int nfs_scan_list(struct nfs_inode *nfsi, 396int nfs_scan_list(struct nfs_inode *nfsi,
396 struct list_head *dst, pgoff_t idx_start, 397 struct list_head *dst, pgoff_t idx_start,
@@ -430,7 +431,7 @@ int nfs_scan_list(struct nfs_inode *nfsi,
430 } 431 }
431 } 432 }
432 /* for latency reduction */ 433 /* for latency reduction */
433 cond_resched_lock(&nfsi->req_lock); 434 cond_resched_lock(&nfsi->vfs_inode.i_lock);
434 } 435 }
435out: 436out:
436 return res; 437 return res;