提交 fa8d8c5b 编写于 作者: T Trond Myklebust

NFS: Fix nfs_release_page

invalidate_inode_pages2_range() will clear the PG_dirty bit before calling
try_to_release_page().
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 61822ab5
...@@ -315,13 +315,14 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset) ...@@ -315,13 +315,14 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
static int nfs_release_page(struct page *page, gfp_t gfp) static int nfs_release_page(struct page *page, gfp_t gfp)
{ {
if (gfp & __GFP_FS) /*
return !nfs_wb_page(page->mapping->host, page); * Avoid deadlock on nfs_wait_on_request().
else */
/* if (!(gfp & __GFP_FS))
* Avoid deadlock on nfs_wait_on_request().
*/
return 0; return 0;
/* Hack... Force nfs_wb_page() to write out the page */
SetPageDirty(page);
return !nfs_wb_page(page->mapping->host, page);
} }
const struct address_space_operations nfs_file_aops = { const struct address_space_operations nfs_file_aops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册