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

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
......@@ -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 {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment