Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223053
b: refs/heads/master
c: 2df485a
h: refs/heads/master
i:
  223051: 6002a93
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 8, 2010
1 parent b019c5d commit d15c8e3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0de1b7e800188782973598158e0acbb9e08e6c99
refs/heads/master: 2df485a774ba59c3f43bfe84107672c1d9b731a0
4 changes: 2 additions & 2 deletions trunk/fs/nfs/pagelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int nfs_set_page_tag_locked(struct nfs_page *req)
{
if (!nfs_lock_request_dontget(req))
return 0;
if (req->wb_page != NULL)
if (test_bit(PG_MAPPED, &req->wb_flags))
radix_tree_tag_set(&NFS_I(req->wb_context->path.dentry->d_inode)->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
return 1;
}
Expand All @@ -125,7 +125,7 @@ int nfs_set_page_tag_locked(struct nfs_page *req)
*/
void nfs_clear_page_tag_locked(struct nfs_page *req)
{
if (req->wb_page != NULL) {
if (test_bit(PG_MAPPED, &req->wb_flags)) {
struct inode *inode = req->wb_context->path.dentry->d_inode;
struct nfs_inode *nfsi = NFS_I(inode);

Expand Down
1 change: 0 additions & 1 deletion trunk/fs/nfs/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static void nfs_readpage_release(struct nfs_page *req)
(long long)NFS_FILEID(req->wb_context->path.dentry->d_inode),
req->wb_bytes,
(long long)req_offset(req));
nfs_clear_request(req);
nfs_release_request(req);
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
if (nfs_have_delegation(inode, FMODE_WRITE))
nfsi->change_attr++;
}
set_bit(PG_MAPPED, &req->wb_flags);
SetPagePrivate(req->wb_page);
set_page_private(req->wb_page, (unsigned long)req);
nfsi->npages++;
Expand All @@ -415,14 +416,14 @@ static void nfs_inode_remove_request(struct nfs_page *req)
spin_lock(&inode->i_lock);
set_page_private(req->wb_page, 0);
ClearPagePrivate(req->wb_page);
clear_bit(PG_MAPPED, &req->wb_flags);
radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index);
nfsi->npages--;
if (!nfsi->npages) {
spin_unlock(&inode->i_lock);
iput(inode);
} else
spin_unlock(&inode->i_lock);
nfs_clear_request(req);
nfs_release_request(req);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/nfs_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
enum {
PG_BUSY = 0,
PG_MAPPED,
PG_CLEAN,
PG_NEED_COMMIT,
PG_NEED_RESCHED,
Expand Down

0 comments on commit d15c8e3

Please sign in to comment.