mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
ceph: Add necessary clean up if invalid reply received in handle_reply()
Wake up possible waiters, invoke the call back if any, unregister the request Signed-off-by: Li Wang <liwang@ubuntukylin.com> Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com> Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
f36132a75a
commit
37c89bde5d
1 changed files with 7 additions and 0 deletions
|
@ -1581,6 +1581,13 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
|
|||
return;
|
||||
|
||||
bad_put:
|
||||
req->r_result = -EIO;
|
||||
__unregister_request(osdc, req);
|
||||
if (req->r_callback)
|
||||
req->r_callback(req, msg);
|
||||
else
|
||||
complete_all(&req->r_completion);
|
||||
complete_request(req);
|
||||
ceph_osdc_put_request(req);
|
||||
bad_mutex:
|
||||
mutex_unlock(&osdc->request_mutex);
|
||||
|
|
Loading…
Reference in a new issue