aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-31 10:49:22 -0500
committerIlya Dryomov <ilya.dryomov@inktank.com>2014-02-03 12:20:59 -0500
commitc172ec5c8dc8c09dd5958f4ae542fa321bb15a92 (patch)
tree5eaa074d38b7518225ed4e82f35b399fe13c317a /net
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
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>
Diffstat (limited to 'net')
-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 010ff3bd58ad..166d4c7ba065 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)
2504 err = -ENOMEM; 2504 err = -ENOMEM;
2505 osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify"); 2505 osdc->notify_wq = create_singlethread_workqueue("ceph-watch-notify");
2506 if (!osdc->notify_wq) 2506 if (!osdc->notify_wq)
2507 goto out_msgpool; 2507 goto out_msgpool_reply;
2508
2508 return 0; 2509 return 0;
2509 2510
2511out_msgpool_reply:
2512 ceph_msgpool_destroy(&osdc->msgpool_op_reply);
2510out_msgpool: 2513out_msgpool:
2511 ceph_msgpool_destroy(&osdc->msgpool_op); 2514 ceph_msgpool_destroy(&osdc->msgpool_op);
2512out_mempool: 2515out_mempool: