From: ftillier Date: Thu, 2 Mar 2006 17:17:21 +0000 (+0000) Subject: [IBAL] Call um_close_ca after child resources are released. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=041ab2c8dd5598afe76f9e51f4b1e0b2fd6f8df7;p=~shefty%2Frdma-win.git [IBAL] Call um_close_ca after child resources are released. git-svn-id: svn://openib.tc.cornell.edu/gen1@226 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/core/al/al_ca.c b/trunk/core/al/al_ca.c index f1bbf59f..7ebacd5c 100644 --- a/trunk/core/al/al_ca.c +++ b/trunk/core/al/al_ca.c @@ -51,12 +51,12 @@ static void __destroying_ca( IN struct _al_obj *p_obj ); -void -cleanup_ca( +static void +__cleanup_ca( IN struct _al_obj *p_obj ); -void -free_ca( +static void +__free_ca( IN struct _al_obj *p_obj ); @@ -123,10 +123,10 @@ open_ca( h_ca->pfn_event_cb = pfn_ca_event_cb; status = init_al_obj( &h_ca->obj, ca_context, TRUE, - __destroying_ca, cleanup_ca, free_ca ); + NULL, __cleanup_ca, __free_ca ); if( status != IB_SUCCESS ) { - free_ca( &h_ca->obj ); + __free_ca( &h_ca->obj ); CL_EXIT( AL_DBG_CA, g_al_dbg_lvl ); return status; } @@ -194,8 +194,11 @@ ib_close_ca( } +/* + * Release all resources associated with the CA. + */ static void -__destroying_ca( +__cleanup_ca( IN struct _al_obj *p_obj ) { #if defined(CL_KERNEL) @@ -208,19 +211,8 @@ __destroying_ca( h_ca->obj.p_ci_ca->verbs.um_close_ca( h_ca->obj.p_ci_ca->h_ci_ca, h_ca->h_um_ca ); } -#else - UNUSED_PARAM( p_obj ); #endif -} - -/* - * Release all resources associated with the CA. - */ -void -cleanup_ca( - IN struct _al_obj *p_obj ) -{ /* It is now safe to release the CI CA. */ if( p_obj->p_ci_ca ) release_ci_ca( PARENT_STRUCT( p_obj, ib_ca_t, obj ) ); @@ -228,8 +220,8 @@ cleanup_ca( -void -free_ca( +static void +__free_ca( IN struct _al_obj *p_obj ) { ib_ca_handle_t h_ca;