Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242413
b: refs/heads/master
c: 64bfeb4
h: refs/heads/master
i:
  242411: 4ce5e02
v: v3
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Mar 23, 2011
1 parent 791f150 commit ef05941
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 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: 5f452431e229ea14df61b0ac89eed5881414eef9
refs/heads/master: 64bfeb49bd1c2351a8415f7fe6b25eef208872a5
26 changes: 16 additions & 10 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,14 +1357,28 @@ static void nfs_init_commit(struct nfs_write_data *data,
nfs_fattr_init(&data->fattr);
}

static void nfs_retry_commit(struct list_head *page_list)
{
struct nfs_page *req;

while (!list_empty(page_list)) {
req = nfs_list_entry(page_list->next);
nfs_list_remove_request(req);
nfs_mark_request_commit(req);
dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
dec_bdi_stat(req->wb_page->mapping->backing_dev_info,
BDI_RECLAIMABLE);
nfs_clear_page_tag_locked(req);
}
}

/*
* Commit dirty pages
*/
static int
nfs_commit_list(struct inode *inode, struct list_head *head, int how)
{
struct nfs_write_data *data;
struct nfs_page *req;

data = nfs_commitdata_alloc();

Expand All @@ -1375,15 +1389,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how)
nfs_init_commit(data, head);
return nfs_initiate_commit(data, NFS_CLIENT(inode), data->mds_ops, how);
out_bad:
while (!list_empty(head)) {
req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_mark_request_commit(req);
dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS);
dec_bdi_stat(req->wb_page->mapping->backing_dev_info,
BDI_RECLAIMABLE);
nfs_clear_page_tag_locked(req);
}
nfs_retry_commit(head);
nfs_commit_clear_lock(NFS_I(inode));
return -ENOMEM;
}
Expand Down

0 comments on commit ef05941

Please sign in to comment.