Drop this useless helper and call cct->put() directly. The comment that
this can't be used after global_init is no longer relevant as long as
nobody puts a reference they don't own... and nobody owns
g_ceph_context.
Signed-off-by: Sage Weil <sage@inktank.com>
}
}
-void common_destroy_context(CephContext *cct)
-{
- //delete cct; // TODO: fix #845
-}
*/
void common_init_finish(CephContext *cct);
-/* This function is called from library code to destroy a context created by
- * the library.
- * You should not call this function if you called global_init.
- */
-void common_destroy_context(CephContext *cct);
-
#endif
try {
shutdown();
if (cct) {
- common_destroy_context(cct);
+ cct->put();
cct = NULL;
}
}
delete messenger;
if (objecter)
delete objecter;
- common_destroy_context(cct);
cct->put();
cct = NULL;
}
void librgw_shutdown(librgw_t rgw)
{
- common_destroy_context(rgw);
+ rgw->put();
}