diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-02 09:57:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:38 -0400 |
commit | 587142f85f796cf0b823dd3080e815f02ff6b952 (patch) | |
tree | 891e9389d09916ff2c307dc5ada1c65303660c8d /fs/nfs/pagelist.c | |
parent | 4e56e082dd89266d320ccfbc7bd0102186a765ac (diff) |
NFS: Replace NFS_I(inode)->req_lock with inode->i_lock
There is no justification for keeping a special spinlock for the exclusive
use of the NFS writeback code.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 11 |
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 | */ |
127 | void nfs_clear_page_tag_locked(struct nfs_page *req) | 127 | void 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 | */ |
395 | int nfs_scan_list(struct nfs_inode *nfsi, | 396 | int 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 | } |
435 | out: | 436 | out: |
436 | return res; | 437 | return res; |