Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[cascardo/linux.git] / fs / gfs2 / main.c
index c150298..a8d9bcd 100644 (file)
@@ -28,6 +28,8 @@
 #include "recovery.h"
 #include "dir.h"
 
+struct workqueue_struct *gfs2_control_wq;
+
 static struct shrinker qd_shrinker = {
        .shrink = gfs2_shrink_qd_memory,
        .seeks = DEFAULT_SEEKS,
@@ -146,12 +148,19 @@ static int __init init_gfs2_fs(void)
        if (!gfs_recovery_wq)
                goto fail_wq;
 
+       gfs2_control_wq = alloc_workqueue("gfs2_control",
+                              WQ_NON_REENTRANT | WQ_UNBOUND | WQ_FREEZABLE, 0);
+       if (!gfs2_control_wq)
+               goto fail_control;
+
        gfs2_register_debugfs();
 
        printk("GFS2 installed\n");
 
        return 0;
 
+fail_control:
+       destroy_workqueue(gfs_recovery_wq);
 fail_wq:
        unregister_filesystem(&gfs2meta_fs_type);
 fail_unregister:
@@ -195,6 +204,7 @@ static void __exit exit_gfs2_fs(void)
        unregister_filesystem(&gfs2_fs_type);
        unregister_filesystem(&gfs2meta_fs_type);
        destroy_workqueue(gfs_recovery_wq);
+       destroy_workqueue(gfs2_control_wq);
 
        rcu_barrier();