Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32119
b: refs/heads/master
c: 83715ad
h: refs/heads/master
i:
  32117: b57c8ee
  32115: de7d82f
  32111: 56abc09
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 5, 2006
1 parent 65ffbb3 commit 6888365
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 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: 5e66dd6d66ffe758b39b6dcadf2330753ee1159b
refs/heads/master: 83715ad54fad5a7ed330110f83e31ae92630e9d9
20 changes: 17 additions & 3 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ static int nfs_wait_on_requests(struct inode *inode, unsigned long idx_start, un
return ret;
}

static void nfs_cancel_requests(struct list_head *head)
static void nfs_cancel_dirty_list(struct list_head *head)
{
struct nfs_page *req;
while(!list_empty(head)) {
Expand All @@ -589,6 +589,19 @@ static void nfs_cancel_requests(struct list_head *head)
}
}

static void nfs_cancel_commit_list(struct list_head *head)
{
struct nfs_page *req;

while(!list_empty(head)) {
req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_inode_remove_request(req);
nfs_clear_page_writeback(req);
dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
}
}

/*
* nfs_scan_dirty - Scan an inode for dirty requests
* @inode: NFS inode to scan
Expand Down Expand Up @@ -1381,6 +1394,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
nfs_list_remove_request(req);
nfs_mark_request_commit(req);
nfs_clear_page_writeback(req);
dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
}
return -ENOMEM;
}
Expand Down Expand Up @@ -1499,7 +1513,7 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start,
if (pages != 0) {
spin_unlock(&nfsi->req_lock);
if (how & FLUSH_INVALIDATE)
nfs_cancel_requests(&head);
nfs_cancel_dirty_list(&head);
else
ret = nfs_flush_list(inode, &head, pages, how);
spin_lock(&nfsi->req_lock);
Expand All @@ -1512,7 +1526,7 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start,
break;
if (how & FLUSH_INVALIDATE) {
spin_unlock(&nfsi->req_lock);
nfs_cancel_requests(&head);
nfs_cancel_commit_list(&head);
spin_lock(&nfsi->req_lock);
continue;
}
Expand Down

0 comments on commit 6888365

Please sign in to comment.