summaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorLi Wang <liwang@ubuntukylin.com>2013-11-27 15:28:14 +0100
committerSage Weil <sage@inktank.com>2013-12-13 18:13:29 +0100
commit37c89bde5d402c25211a9e31e3166067f85aa31b (patch)
tree0aba7c4f019102f308a5f9c01cea5f5136242721 /net/ceph/osd_client.c
parentceph: Clean up if error occurred in finish_read() (diff)
downloadlinux-37c89bde5d402c25211a9e31e3166067f85aa31b.tar.xz
linux-37c89bde5d402c25211a9e31e3166067f85aa31b.zip
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>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 2b4b32aaa893..a17eaae820f8 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1581,6 +1581,13 @@ done:
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);