aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/main.c')
-rw-r--r--fs/gfs2/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 7cacfde32194..86fe06798711 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -23,6 +23,12 @@
23#include "sys.h" 23#include "sys.h"
24#include "util.h" 24#include "util.h"
25#include "glock.h" 25#include "glock.h"
26#include "quota.h"
27
28static struct shrinker qd_shrinker = {
29 .shrink = gfs2_shrink_qd_memory,
30 .seeks = DEFAULT_SEEKS,
31};
26 32
27static void gfs2_init_inode_once(void *foo) 33static void gfs2_init_inode_once(void *foo)
28{ 34{
@@ -100,6 +106,8 @@ static int __init init_gfs2_fs(void)
100 if (!gfs2_quotad_cachep) 106 if (!gfs2_quotad_cachep)
101 goto fail; 107 goto fail;
102 108
109 register_shrinker(&qd_shrinker);
110
103 error = register_filesystem(&gfs2_fs_type); 111 error = register_filesystem(&gfs2_fs_type);
104 if (error) 112 if (error)
105 goto fail; 113 goto fail;
@@ -117,6 +125,7 @@ static int __init init_gfs2_fs(void)
117fail_unregister: 125fail_unregister:
118 unregister_filesystem(&gfs2_fs_type); 126 unregister_filesystem(&gfs2_fs_type);
119fail: 127fail:
128 unregister_shrinker(&qd_shrinker);
120 gfs2_glock_exit(); 129 gfs2_glock_exit();
121 130
122 if (gfs2_quotad_cachep) 131 if (gfs2_quotad_cachep)
@@ -145,6 +154,7 @@ fail:
145 154
146static void __exit exit_gfs2_fs(void) 155static void __exit exit_gfs2_fs(void)
147{ 156{
157 unregister_shrinker(&qd_shrinker);
148 gfs2_glock_exit(); 158 gfs2_glock_exit();
149 gfs2_unregister_debugfs(); 159 gfs2_unregister_debugfs();
150 unregister_filesystem(&gfs2_fs_type); 160 unregister_filesystem(&gfs2_fs_type);