diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/gfs2/main.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'fs/gfs2/main.c')
-rw-r--r-- | fs/gfs2/main.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index b1e9630eb46a..c2b34cd2abe0 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" |
@@ -24,6 +26,7 @@ | |||
24 | #include "glock.h" | 26 | #include "glock.h" |
25 | #include "quota.h" | 27 | #include "quota.h" |
26 | #include "recovery.h" | 28 | #include "recovery.h" |
29 | #include "dir.h" | ||
27 | 30 | ||
28 | static struct shrinker qd_shrinker = { | 31 | static struct shrinker qd_shrinker = { |
29 | .shrink = gfs2_shrink_qd_memory, | 32 | .shrink = gfs2_shrink_qd_memory, |
@@ -44,12 +47,13 @@ static void gfs2_init_glock_once(void *foo) | |||
44 | { | 47 | { |
45 | struct gfs2_glock *gl = foo; | 48 | struct gfs2_glock *gl = foo; |
46 | 49 | ||
47 | INIT_HLIST_NODE(&gl->gl_list); | 50 | INIT_HLIST_BL_NODE(&gl->gl_list); |
48 | spin_lock_init(&gl->gl_spin); | 51 | spin_lock_init(&gl->gl_spin); |
49 | INIT_LIST_HEAD(&gl->gl_holders); | 52 | INIT_LIST_HEAD(&gl->gl_holders); |
50 | INIT_LIST_HEAD(&gl->gl_lru); | 53 | INIT_LIST_HEAD(&gl->gl_lru); |
51 | INIT_LIST_HEAD(&gl->gl_ail_list); | 54 | INIT_LIST_HEAD(&gl->gl_ail_list); |
52 | atomic_set(&gl->gl_ail_count, 0); | 55 | atomic_set(&gl->gl_ail_count, 0); |
56 | atomic_set(&gl->gl_revokes, 0); | ||
53 | } | 57 | } |
54 | 58 | ||
55 | static void gfs2_init_gl_aspace_once(void *foo) | 59 | static void gfs2_init_gl_aspace_once(void *foo) |
@@ -58,14 +62,7 @@ static void gfs2_init_gl_aspace_once(void *foo) | |||
58 | struct address_space *mapping = (struct address_space *)(gl + 1); | 62 | struct address_space *mapping = (struct address_space *)(gl + 1); |
59 | 63 | ||
60 | gfs2_init_glock_once(gl); | 64 | gfs2_init_glock_once(gl); |
61 | memset(mapping, 0, sizeof(*mapping)); | 65 | address_space_init_once(mapping); |
62 | INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC); | ||
63 | spin_lock_init(&mapping->tree_lock); | ||
64 | spin_lock_init(&mapping->i_mmap_lock); | ||
65 | INIT_LIST_HEAD(&mapping->private_list); | ||
66 | spin_lock_init(&mapping->private_lock); | ||
67 | INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap); | ||
68 | INIT_LIST_HEAD(&mapping->i_mmap_nonlinear); | ||
69 | } | 66 | } |
70 | 67 | ||
71 | /** | 68 | /** |
@@ -78,6 +75,9 @@ static int __init init_gfs2_fs(void) | |||
78 | { | 75 | { |
79 | int error; | 76 | int error; |
80 | 77 | ||
78 | gfs2_str2qstr(&gfs2_qdot, "."); | ||
79 | gfs2_str2qstr(&gfs2_qdotdot, ".."); | ||
80 | |||
81 | error = gfs2_sys_init(); | 81 | error = gfs2_sys_init(); |
82 | if (error) | 82 | if (error) |
83 | return error; | 83 | return error; |
@@ -140,13 +140,13 @@ static int __init init_gfs2_fs(void) | |||
140 | 140 | ||
141 | error = -ENOMEM; | 141 | error = -ENOMEM; |
142 | gfs_recovery_wq = alloc_workqueue("gfs_recovery", | 142 | gfs_recovery_wq = alloc_workqueue("gfs_recovery", |
143 | WQ_NON_REENTRANT | WQ_RESCUER, 0); | 143 | WQ_MEM_RECLAIM | WQ_FREEZABLE, 0); |
144 | if (!gfs_recovery_wq) | 144 | if (!gfs_recovery_wq) |
145 | goto fail_wq; | 145 | goto fail_wq; |
146 | 146 | ||
147 | gfs2_register_debugfs(); | 147 | gfs2_register_debugfs(); |
148 | 148 | ||
149 | printk("GFS2 (built %s %s) installed\n", __DATE__, __TIME__); | 149 | printk("GFS2 installed\n"); |
150 | 150 | ||
151 | return 0; | 151 | return 0; |
152 | 152 | ||
@@ -194,6 +194,8 @@ static void __exit exit_gfs2_fs(void) | |||
194 | unregister_filesystem(&gfs2meta_fs_type); | 194 | unregister_filesystem(&gfs2meta_fs_type); |
195 | destroy_workqueue(gfs_recovery_wq); | 195 | destroy_workqueue(gfs_recovery_wq); |
196 | 196 | ||
197 | rcu_barrier(); | ||
198 | |||
197 | kmem_cache_destroy(gfs2_quotad_cachep); | 199 | kmem_cache_destroy(gfs2_quotad_cachep); |
198 | kmem_cache_destroy(gfs2_rgrpd_cachep); | 200 | kmem_cache_destroy(gfs2_rgrpd_cachep); |
199 | kmem_cache_destroy(gfs2_bufdata_cachep); | 201 | kmem_cache_destroy(gfs2_bufdata_cachep); |