提交 6d677e35 编写于 作者: T Trond Myklebust 提交者: Linus Torvalds

NFS: Don't clear PG_writeback until after we've processed unstable writes

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8e821cad
...@@ -920,8 +920,8 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how) ...@@ -920,8 +920,8 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how)
list_del(&data->pages); list_del(&data->pages);
nfs_writedata_release(data); nfs_writedata_release(data);
} }
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req); nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req); nfs_clear_page_writeback(req);
return -ENOMEM; return -ENOMEM;
} }
...@@ -966,8 +966,8 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how) ...@@ -966,8 +966,8 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how)
while (!list_empty(head)) { while (!list_empty(head)) {
struct nfs_page *req = nfs_list_entry(head->next); struct nfs_page *req = nfs_list_entry(head->next);
nfs_list_remove_request(req); nfs_list_remove_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req); nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req); nfs_clear_page_writeback(req);
} }
return -ENOMEM; return -ENOMEM;
...@@ -1002,8 +1002,8 @@ static int nfs_flush_list(struct inode *inode, struct list_head *head, int npage ...@@ -1002,8 +1002,8 @@ static int nfs_flush_list(struct inode *inode, struct list_head *head, int npage
while (!list_empty(head)) { while (!list_empty(head)) {
req = nfs_list_entry(head->next); req = nfs_list_entry(head->next);
nfs_list_remove_request(req); nfs_list_remove_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_redirty_request(req); nfs_redirty_request(req);
nfs_end_page_writeback(req->wb_page);
nfs_clear_page_writeback(req); nfs_clear_page_writeback(req);
} }
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册