ceph: handle errors during osd client init

Unwind initializing if we get ENOMEM during client initialization.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil
2009-11-18 14:52:18 -08:00
parent 71ececdaca
commit 5f44f14260
4 changed files with 19 additions and 7 deletions

View File

@@ -530,9 +530,13 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args)
err = ceph_osdc_init(&client->osdc, client);
if (err < 0)
goto fail_monc;
ceph_mdsc_init(&client->mdsc, client);
err = ceph_mdsc_init(&client->mdsc, client);
if (err < 0)
goto fail_osdc;
return client;
fail_osdc:
ceph_osdc_stop(&client->osdc);
fail_monc:
ceph_monc_stop(&client->monc);
fail_trunc_wq: