Commit 37c89bde authored by Li Wang's avatar Li Wang Committed by Sage Weil

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: default avatarLi Wang <liwang@ubuntukylin.com>
Signed-off-by: default avatarYunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: default avatarSage Weil <sage@inktank.com>
parent f36132a7
...@@ -1581,6 +1581,13 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg, ...@@ -1581,6 +1581,13 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
return; return;
bad_put: 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); ceph_osdc_put_request(req);
bad_mutex: bad_mutex:
mutex_unlock(&osdc->request_mutex); mutex_unlock(&osdc->request_mutex);
......
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