aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <hawk@comx.dk>2009-07-05 22:29:27 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-07-05 22:29:27 -0400
commit3e03f9ca6a2599db1823bb0ea24e0845219a0e69 (patch)
tree5eddfee10fa2ba535441ad87b9382c8d686b5e07 /fs/ext4
parent726447d803802cd0be8f62d17c4a34421781b938 (diff)
ext4: Use rcu_barrier() on module unload.
The ext4 module uses rcu_call() thus it should use rcu_barrier()on module unload. The kmem cache ext4_pspace_cachep is sometimes free'ed using call_rcu() callbacks. Thus, we must wait for completion of call_rcu() before doing kmem_cache_destroy(). Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/mballoc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 4a45efabb203..2fcaf286f1de 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2909,7 +2909,11 @@ int __init init_ext4_mballoc(void)
2909 2909
2910void exit_ext4_mballoc(void) 2910void exit_ext4_mballoc(void)
2911{ 2911{
2912 /* XXX: synchronize_rcu(); */ 2912 /*
2913 * Wait for completion of call_rcu()'s on ext4_pspace_cachep
2914 * before destroying the slab cache.
2915 */
2916 rcu_barrier();
2913 kmem_cache_destroy(ext4_pspace_cachep); 2917 kmem_cache_destroy(ext4_pspace_cachep);
2914 kmem_cache_destroy(ext4_ac_cachep); 2918 kmem_cache_destroy(ext4_ac_cachep);
2915 kmem_cache_destroy(ext4_free_ext_cachep); 2919 kmem_cache_destroy(ext4_free_ext_cachep);