Commit 22876f54 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFS: Don't call generic_error_remove_page() while holding locks

The NFS read code can trigger writeback while holding the page lock.
If an error then triggers a call to nfs_write_error_remove_page(),
we can deadlock.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 14bebe3c
...@@ -584,9 +584,8 @@ nfs_lock_and_join_requests(struct page *page) ...@@ -584,9 +584,8 @@ nfs_lock_and_join_requests(struct page *page)
static void nfs_write_error_remove_page(struct nfs_page *req) static void nfs_write_error_remove_page(struct nfs_page *req)
{ {
SetPageError(req->wb_page);
nfs_end_page_writeback(req); nfs_end_page_writeback(req);
generic_error_remove_page(page_file_mapping(req->wb_page),
req->wb_page);
nfs_release_request(req); nfs_release_request(req);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment