Skip to content

Commit

Permalink
NFS: Don't call generic_error_remove_page() while holding locks
Browse files Browse the repository at this point in the history
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: Trond Myklebust <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
trondmy authored and amschuma-ntap committed Apr 25, 2019
1 parent 14bebe3 commit 22876f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,8 @@ nfs_lock_and_join_requests(struct page *page)

static void nfs_write_error_remove_page(struct nfs_page *req)
{
SetPageError(req->wb_page);
nfs_end_page_writeback(req);
generic_error_remove_page(page_file_mapping(req->wb_page),
req->wb_page);
nfs_release_request(req);
}

Expand Down

0 comments on commit 22876f5

Please sign in to comment.