提交 94970014 编写于 作者: W Weston Andros Adamson 提交者: 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: NPeng Tao <tao.peng@primarydata.com>
Signed-off-by: NWeston Andros Adamson <dros@primarydata.com>
Reviewed-by: NPeng Tao <tao.peng@primarydata.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册