diff options
Diffstat (limited to 'fs/gfs2/main.c')
| -rw-r--r-- | fs/gfs2/main.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 85ba027d1c4d..888a5f5a1a58 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/gfs2_ondisk.h> | 16 | #include <linux/gfs2_ondisk.h> |
| 17 | #include <linux/rcupdate.h> | ||
| 18 | #include <linux/rculist_bl.h> | ||
| 17 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
| 18 | 20 | ||
| 19 | #include "gfs2.h" | 21 | #include "gfs2.h" |
| @@ -45,7 +47,7 @@ static void gfs2_init_glock_once(void *foo) | |||
| 45 | { | 47 | { |
| 46 | struct gfs2_glock *gl = foo; | 48 | struct gfs2_glock *gl = foo; |
| 47 | 49 | ||
| 48 | INIT_HLIST_NODE(&gl->gl_list); | 50 | INIT_HLIST_BL_NODE(&gl->gl_list); |
| 49 | spin_lock_init(&gl->gl_spin); | 51 | spin_lock_init(&gl->gl_spin); |
| 50 | INIT_LIST_HEAD(&gl->gl_holders); | 52 | INIT_LIST_HEAD(&gl->gl_holders); |
| 51 | INIT_LIST_HEAD(&gl->gl_lru); | 53 | INIT_LIST_HEAD(&gl->gl_lru); |
| @@ -59,14 +61,7 @@ static void gfs2_init_gl_aspace_once(void *foo) | |||
| 59 | struct address_space *mapping = (struct address_space *)(gl + 1); | 61 | struct address_space *mapping = (struct address_space *)(gl + 1); |
| 60 | 62 | ||
| 61 | gfs2_init_glock_once(gl); | 63 | gfs2_init_glock_once(gl); |
| 62 | memset(mapping, 0, sizeof(*mapping)); | 64 | address_space_init_once(mapping); |
| 63 | INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC); | ||
| 64 | spin_lock_init(&mapping->tree_lock); | ||
| 65 | spin_lock_init(&mapping->i_mmap_lock); | ||
| 66 | INIT_LIST_HEAD(&mapping->private_list); | ||
| 67 | spin_lock_init(&mapping->private_lock); | ||
| 68 | INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap); | ||
| 69 | INIT_LIST_HEAD(&mapping->i_mmap_nonlinear); | ||
| 70 | } | 65 | } |
| 71 | 66 | ||
| 72 | /** | 67 | /** |
| @@ -198,6 +193,8 @@ static void __exit exit_gfs2_fs(void) | |||
| 198 | unregister_filesystem(&gfs2meta_fs_type); | 193 | unregister_filesystem(&gfs2meta_fs_type); |
| 199 | destroy_workqueue(gfs_recovery_wq); | 194 | destroy_workqueue(gfs_recovery_wq); |
| 200 | 195 | ||
| 196 | rcu_barrier(); | ||
| 197 | |||
| 201 | kmem_cache_destroy(gfs2_quotad_cachep); | 198 | kmem_cache_destroy(gfs2_quotad_cachep); |
| 202 | kmem_cache_destroy(gfs2_rgrpd_cachep); | 199 | kmem_cache_destroy(gfs2_rgrpd_cachep); |
| 203 | kmem_cache_destroy(gfs2_bufdata_cachep); | 200 | kmem_cache_destroy(gfs2_bufdata_cachep); |
