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>

authored by Jesper Dangaard Brouer and committed by Theodore Ts'o 3e03f9ca 726447d8

+5 -1
+5 -1
fs/ext4/mballoc.c
··· 2909 2909 2910 2910 void 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 2917 kmem_cache_destroy(ext4_pspace_cachep); 2914 2918 kmem_cache_destroy(ext4_ac_cachep); 2915 2919 kmem_cache_destroy(ext4_free_ext_cachep);