diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-04-07 13:59:03 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-04-25 14:18:14 -0400 |
commit | 22876f540bdf19af9e4fca893ce02ba7ee65ebcc (patch) | |
tree | df5c2374fb5b221a61a37977754644521c80b8cb /fs/nfs/write.c | |
parent | 14bebe3c90b326d2a0df78aed5e9de090c71d878 (diff) | |
download | linux-stable-22876f540bdf19af9e4fca893ce02ba7ee65ebcc.tar.gz linux-stable-22876f540bdf19af9e4fca893ce02ba7ee65ebcc.tar.bz2 linux-stable-22876f540bdf19af9e4fca893ce02ba7ee65ebcc.zip |
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.c | 3 |
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); } |