diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-09-09 22:31:28 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-09-09 22:36:40 +0300 |
commit | 8b77484f2b3d8f1096a2231d513fc589e4857a73 (patch) | |
tree | e3da966ad54bc63f5a62d1ded3e17603395e7b0e /fs | |
parent | 5d2a9d9dac902f438daa1334540398aec6c8dcfa (diff) | |
download | linux-8b77484f2b3d8f1096a2231d513fc589e4857a73.tar.xz |
NFS: Don't hold the group lock when calling nfs_release_request()
That can deadlock if this is the last reference since
nfs_page_group_destroy() calls nfs_page_group_sync_on_bit().
Note that even if the page was removed from the subpage list,
the req->wb_head could still be pointing to the old head.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 121218d4e5ed..36d34a4c86bd 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -532,9 +532,9 @@ try_again: } else if (WARN_ON_ONCE(subreq->wb_offset < head->wb_offset || ((subreq->wb_offset + subreq->wb_bytes) > (head->wb_offset + total_bytes)))) { + nfs_page_group_unlock(head); nfs_unroll_locks(inode, head, subreq); nfs_unlock_and_release_request(subreq); - nfs_page_group_unlock(head); nfs_unlock_and_release_request(head); return ERR_PTR(-EIO); } |