diff options
Diffstat (limited to 'fs/gfs2/main.c')
-rw-r--r-- | fs/gfs2/main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 7cacfde32194..a6892ed0840a 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c | |||
@@ -14,7 +14,6 @@ | |||
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/lm_interface.h> | ||
18 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
19 | 18 | ||
20 | #include "gfs2.h" | 19 | #include "gfs2.h" |
@@ -23,6 +22,12 @@ | |||
23 | #include "sys.h" | 22 | #include "sys.h" |
24 | #include "util.h" | 23 | #include "util.h" |
25 | #include "glock.h" | 24 | #include "glock.h" |
25 | #include "quota.h" | ||
26 | |||
27 | static struct shrinker qd_shrinker = { | ||
28 | .shrink = gfs2_shrink_qd_memory, | ||
29 | .seeks = DEFAULT_SEEKS, | ||
30 | }; | ||
26 | 31 | ||
27 | static void gfs2_init_inode_once(void *foo) | 32 | static void gfs2_init_inode_once(void *foo) |
28 | { | 33 | { |
@@ -41,8 +46,6 @@ static void gfs2_init_glock_once(void *foo) | |||
41 | INIT_HLIST_NODE(&gl->gl_list); | 46 | INIT_HLIST_NODE(&gl->gl_list); |
42 | spin_lock_init(&gl->gl_spin); | 47 | spin_lock_init(&gl->gl_spin); |
43 | INIT_LIST_HEAD(&gl->gl_holders); | 48 | INIT_LIST_HEAD(&gl->gl_holders); |
44 | gl->gl_lvb = NULL; | ||
45 | atomic_set(&gl->gl_lvb_count, 0); | ||
46 | INIT_LIST_HEAD(&gl->gl_lru); | 49 | INIT_LIST_HEAD(&gl->gl_lru); |
47 | INIT_LIST_HEAD(&gl->gl_ail_list); | 50 | INIT_LIST_HEAD(&gl->gl_ail_list); |
48 | atomic_set(&gl->gl_ail_count, 0); | 51 | atomic_set(&gl->gl_ail_count, 0); |
@@ -100,6 +103,8 @@ static int __init init_gfs2_fs(void) | |||
100 | if (!gfs2_quotad_cachep) | 103 | if (!gfs2_quotad_cachep) |
101 | goto fail; | 104 | goto fail; |
102 | 105 | ||
106 | register_shrinker(&qd_shrinker); | ||
107 | |||
103 | error = register_filesystem(&gfs2_fs_type); | 108 | error = register_filesystem(&gfs2_fs_type); |
104 | if (error) | 109 | if (error) |
105 | goto fail; | 110 | goto fail; |
@@ -117,6 +122,7 @@ static int __init init_gfs2_fs(void) | |||
117 | fail_unregister: | 122 | fail_unregister: |
118 | unregister_filesystem(&gfs2_fs_type); | 123 | unregister_filesystem(&gfs2_fs_type); |
119 | fail: | 124 | fail: |
125 | unregister_shrinker(&qd_shrinker); | ||
120 | gfs2_glock_exit(); | 126 | gfs2_glock_exit(); |
121 | 127 | ||
122 | if (gfs2_quotad_cachep) | 128 | if (gfs2_quotad_cachep) |
@@ -145,6 +151,7 @@ fail: | |||
145 | 151 | ||
146 | static void __exit exit_gfs2_fs(void) | 152 | static void __exit exit_gfs2_fs(void) |
147 | { | 153 | { |
154 | unregister_shrinker(&qd_shrinker); | ||
148 | gfs2_glock_exit(); | 155 | gfs2_glock_exit(); |
149 | gfs2_unregister_debugfs(); | 156 | gfs2_unregister_debugfs(); |
150 | unregister_filesystem(&gfs2_fs_type); | 157 | unregister_filesystem(&gfs2_fs_type); |