summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-31 17:49:22 +0200
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-02-03 19:20:59 +0200
commitc172ec5c8dc8c09dd5958f4ae542fa321bb15a92 (patch)
tree5eaa074d38b7518225ed4e82f35b399fe13c317a
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadop-kernel-dev-c172ec5c8dc8c09dd5958f4ae542fa321bb15a92.zip
op-kernel-dev-c172ec5c8dc8c09dd5958f4ae542fa321bb15a92.tar.gz
libceph: fix error handling in ceph_osdc_init()
msgpool_op_reply message pool isn't destroyed if workqueue construction fails. Fix it. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--net/ceph/osd_client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 010ff3b..166d4c7 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2504,9 +2504,12 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client)
err = -ENOMEM;
osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify");
if (!osdc->notify_wq)
- goto out_msgpool;
+ goto out_msgpool_reply;
+
return 0;
+out_msgpool_reply:
+ ceph_msgpool_destroy(&osdc->msgpool_op_reply);
out_msgpool:
ceph_msgpool_destroy(&osdc->msgpool_op);
out_mempool:
OpenPOWER on IntegriCloud