Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b77484f authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 5d2a9d9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -532,9 +532,9 @@ nfs_lock_and_join_requests(struct page *page)
		} 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);
		}