summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-04-07 20:59:03 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-04-25 21:18:14 +0300
commit22876f540bdf19af9e4fca893ce02ba7ee65ebcc (patch)
treedf5c2374fb5b221a61a37977754644521c80b8cb /fs/nfs/write.c
parent14bebe3c90b326d2a0df78aed5e9de090c71d878 (diff)
downloadlinux-22876f540bdf19af9e4fca893ce02ba7ee65ebcc.tar.xz
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: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 9198a23bb58b..64cf6a340ba6 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -584,9 +584,8 @@ release_request:
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);
}