diff options
author | Sage Weil <sage@newdream.net> | 2009-11-18 17:52:18 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-18 18:02:36 -0500 |
commit | 5f44f142601bf94c448e2d463f0f18fd159da164 (patch) | |
tree | 773b4677c536519435f073b27873212f705c9c3c /fs/ceph/super.c | |
parent | 71ececdacae24be333c534869cb1b06357f0e215 (diff) |
ceph: handle errors during osd client init
Unwind initializing if we get ENOMEM during client initialization.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 1ac7b07214f3..fe0a5962a082 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -530,9 +530,13 @@ static struct ceph_client *ceph_create_client(struct ceph_mount_args *args) | |||
530 | err = ceph_osdc_init(&client->osdc, client); | 530 | err = ceph_osdc_init(&client->osdc, client); |
531 | if (err < 0) | 531 | if (err < 0) |
532 | goto fail_monc; | 532 | goto fail_monc; |
533 | ceph_mdsc_init(&client->mdsc, client); | 533 | err = ceph_mdsc_init(&client->mdsc, client); |
534 | if (err < 0) | ||
535 | goto fail_osdc; | ||
534 | return client; | 536 | return client; |
535 | 537 | ||
538 | fail_osdc: | ||
539 | ceph_osdc_stop(&client->osdc); | ||
536 | fail_monc: | 540 | fail_monc: |
537 | ceph_monc_stop(&client->monc); | 541 | ceph_monc_stop(&client->monc); |
538 | fail_trunc_wq: | 542 | fail_trunc_wq: |