aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:10:23 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:10:23 -0500
commit3d7a641e544e428191667e8b1f83f96fa46dbd65 (patch)
tree172aa672eca96b94f5531885b82abb82b43c7d8a /fs/gfs2
parent66b00a7c93ec782d118d2c03bd599cfd041e80a1 (diff)
SLOW_WORK: Wait for outstanding work items belonging to a module to clear
Wait for outstanding slow work items belonging to a module to clear when unregistering that module as a user of the facility. This prevents the put_ref code of a work item from being taken away before it returns. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/main.c4
-rw-r--r--fs/gfs2/recovery.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index eacd78a5d082..5b31f7741a8f 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -114,7 +114,7 @@ static int __init init_gfs2_fs(void)
114 if (error) 114 if (error)
115 goto fail_unregister; 115 goto fail_unregister;
116 116
117 error = slow_work_register_user(); 117 error = slow_work_register_user(THIS_MODULE);
118 if (error) 118 if (error)
119 goto fail_slow; 119 goto fail_slow;
120 120
@@ -163,7 +163,7 @@ static void __exit exit_gfs2_fs(void)
163 gfs2_unregister_debugfs(); 163 gfs2_unregister_debugfs();
164 unregister_filesystem(&gfs2_fs_type); 164 unregister_filesystem(&gfs2_fs_type);
165 unregister_filesystem(&gfs2meta_fs_type); 165 unregister_filesystem(&gfs2meta_fs_type);
166 slow_work_unregister_user(); 166 slow_work_unregister_user(THIS_MODULE);
167 167
168 kmem_cache_destroy(gfs2_quotad_cachep); 168 kmem_cache_destroy(gfs2_quotad_cachep);
169 kmem_cache_destroy(gfs2_rgrpd_cachep); 169 kmem_cache_destroy(gfs2_rgrpd_cachep);
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 59d2695509d3..b2bb779f09ed 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -593,6 +593,7 @@ fail:
593} 593}
594 594
595struct slow_work_ops gfs2_recover_ops = { 595struct slow_work_ops gfs2_recover_ops = {
596 .owner = THIS_MODULE,
596 .get_ref = gfs2_recover_get_ref, 597 .get_ref = gfs2_recover_get_ref,
597 .put_ref = gfs2_recover_put_ref, 598 .put_ref = gfs2_recover_put_ref,
598 .execute = gfs2_recover_work, 599 .execute = gfs2_recover_work,