Skip to content

Commit

Permalink
NFS: Don't clear PG_writeback until after we've processed unstable wr…
Browse files Browse the repository at this point in the history
…ites

Ensure that we don't release the PG_writeback lock until after the page has
either been redirtied, or queued on the nfs_inode 'commit' list.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Apr 21, 2007
1 parent 8e821ca commit 6d677e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,8 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how)
list_del(&data->pages);
nfs_writedata_release(data);
}
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req);
return -ENOMEM;
}
Expand Down Expand Up @@ -966,8 +966,8 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how)
while (!list_empty(head)) {
struct nfs_page *req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req);
}
return -ENOMEM;
Expand Down Expand Up @@ -1002,8 +1002,8 @@ static int nfs_flush_list(struct inode *inode, struct list_head *head, int npage
while (!list_empty(head)) {
req = nfs_list_entry(head->next);
nfs_list_remove_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req);
}
return error;
Expand Down

0 comments on commit 6d677e3

Please sign in to comment.