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

Commit 94970014 authored by Weston Andros Adamson's avatar Weston Andros Adamson Committed by Trond Myklebust
Browse files

nfs: fix error handling in lock_and_join_requests



This fixes handling of errors from nfs_page_group_lock in
nfs_lock_and_join_requests.  It now releases the inode lock and the
reference to the head request.

Reported-by: default avatarPeng Tao <tao.peng@primarydata.com>
Signed-off-by: default avatarWeston Andros Adamson <dros@primarydata.com>
Reviewed-by: default avatarPeng Tao <tao.peng@primarydata.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent bfd484a5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -480,8 +480,11 @@ nfs_lock_and_join_requests(struct page *page, bool nonblock)

	/* lock each request in the page group */
	ret = nfs_page_group_lock(head, true);
	if (ret < 0)
	if (ret < 0) {
		spin_unlock(&inode->i_lock);
		nfs_release_request(head);
		return ERR_PTR(ret);
	}
	subreq = head;
	do {
		/*