When restarting the stack, the MAD pool tries to deregister
its memory during the cleanup phase. This results in an
error because of an invalid h_mr handle. Fix the error by
deregistering the memory during the destroying callback.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2170
ad392aa1-c5ef-ae45-8dd8-
e69d62a5ef86
\r
/* Remove this pool_key from the AL instance. */\r
al_remove_key( p_pool_key );\r
+ if( p_pool_key->h_mr )\r
+ ib_dereg_mr( p_pool_key->h_mr );\r
\r
p_pool_key->lkey = 0;\r
}\r
\r
CL_ASSERT( !p_pool_key->mad_cnt );\r
\r
- if( p_pool_key->h_mr )\r
- ib_dereg_mr( p_pool_key->h_mr );\r
-\r
/* Search for any outstanding MADs associated with the given pool key. */\r
if( p_pool_key->mad_cnt )\r
{\r