diff options
Diffstat (limited to 'fs/dlm/memory.c')
-rw-r--r-- | fs/dlm/memory.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index 15a8b1cee433..8c44b954c166 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c @@ -72,6 +72,8 @@ out: void dlm_memory_exit(void) { + rcu_barrier(); + kmem_cache_destroy(writequeue_cache); kmem_cache_destroy(mhandle_cache); kmem_cache_destroy(msg_cache); @@ -101,13 +103,19 @@ struct dlm_rsb *dlm_allocate_rsb(struct dlm_ls *ls) return r; } -void dlm_free_rsb(struct dlm_rsb *r) +static void __free_rsb_rcu(struct rcu_head *rcu) { + struct dlm_rsb *r = container_of(rcu, struct dlm_rsb, rcu); if (r->res_lvbptr) dlm_free_lvb(r->res_lvbptr); kmem_cache_free(rsb_cache, r); } +void dlm_free_rsb(struct dlm_rsb *r) +{ + call_rcu(&r->rcu, __free_rsb_rcu); +} + struct dlm_lkb *dlm_allocate_lkb(struct dlm_ls *ls) { struct dlm_lkb *lkb; |