From: bobijam Date: Fri, 10 Apr 2009 01:46:15 +0000 (+0000) Subject: Branch b1_8 X-Git-Tag: v1_8_0_110~114 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ab69f3fd9152149ff2a50b4ad2733908dea06682;p=fs%2Flustre-release.git Branch b1_8 b=18638 i=jinshan.xiong (jay) i=andrew.perepachko (panda) ldlm_lock_put() use RCU to call ldlm_lock_free, so need call synchronize_rcu() to wait a grace period elapsed, so that ldlm_lock_free() get a chance to be called. --- diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 5ed9a1e..28d5823 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -2326,6 +2326,12 @@ void __exit ldlm_exit(void) CERROR("ldlm_refcount is %d in ldlm_exit!\n", ldlm_refcount); rc = cfs_mem_cache_destroy(ldlm_resource_slab); LASSERTF(rc == 0, "couldn't free ldlm resource slab\n"); +#ifdef __KERNEL__ + /* ldlm_lock_put() use RCU to call ldlm_lock_free, so need call + * synchronize_rcu() to wait a grace period elapsed, so that + * ldlm_lock_free() get a chance to be called. */ + synchronize_rcu(); +#endif rc = cfs_mem_cache_destroy(ldlm_lock_slab); LASSERTF(rc == 0, "couldn't free ldlm lock slab\n"); rc = cfs_mem_cache_destroy(ldlm_interval_slab);