|
@@ -468,19 +468,15 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
|
|
/* msgr */
|
|
/* msgr */
|
|
if (ceph_test_opt(client, MYIP))
|
|
if (ceph_test_opt(client, MYIP))
|
|
myaddr = &client->options->my_addr;
|
|
myaddr = &client->options->my_addr;
|
|
- client->msgr = ceph_messenger_create(myaddr,
|
|
|
|
- client->supported_features,
|
|
|
|
- client->required_features);
|
|
|
|
- if (IS_ERR(client->msgr)) {
|
|
|
|
- err = PTR_ERR(client->msgr);
|
|
|
|
- goto fail;
|
|
|
|
- }
|
|
|
|
- client->msgr->nocrc = ceph_test_opt(client, NOCRC);
|
|
|
|
|
|
+ ceph_messenger_init(&client->msgr, myaddr,
|
|
|
|
+ client->supported_features,
|
|
|
|
+ client->required_features,
|
|
|
|
+ ceph_test_opt(client, NOCRC));
|
|
|
|
|
|
/* subsystems */
|
|
/* subsystems */
|
|
err = ceph_monc_init(&client->monc, client);
|
|
err = ceph_monc_init(&client->monc, client);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
- goto fail_msgr;
|
|
|
|
|
|
+ goto fail;
|
|
err = ceph_osdc_init(&client->osdc, client);
|
|
err = ceph_osdc_init(&client->osdc, client);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
goto fail_monc;
|
|
goto fail_monc;
|
|
@@ -489,8 +485,6 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private,
|
|
|
|
|
|
fail_monc:
|
|
fail_monc:
|
|
ceph_monc_stop(&client->monc);
|
|
ceph_monc_stop(&client->monc);
|
|
-fail_msgr:
|
|
|
|
- ceph_messenger_destroy(client->msgr);
|
|
|
|
fail:
|
|
fail:
|
|
kfree(client);
|
|
kfree(client);
|
|
return ERR_PTR(err);
|
|
return ERR_PTR(err);
|
|
@@ -515,8 +509,6 @@ void ceph_destroy_client(struct ceph_client *client)
|
|
|
|
|
|
ceph_debugfs_client_cleanup(client);
|
|
ceph_debugfs_client_cleanup(client);
|
|
|
|
|
|
- ceph_messenger_destroy(client->msgr);
|
|
|
|
-
|
|
|
|
ceph_destroy_options(client->options);
|
|
ceph_destroy_options(client->options);
|
|
|
|
|
|
kfree(client);
|
|
kfree(client);
|