[BACK]Return to xfs_qm_bhv.c CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / mainline-patches / quota

File: [Development] / linux-2.6-xfs / mainline-patches / quota / xfs_qm_bhv.c (download)

Revision 1.1, Thu Dec 21 14:39:45 2006 UTC (10 years, 9 months ago) by donaldd.longdrop.melbourne.sgi.com
Branch: MAIN

Merge up to 2.6.19
Merge of 2.6.x-xfs-melb:linux:27801b by kenmcd.

Use behaviours to initialist the quota module.

--- /tmp/diff_prompt.23964.update_only	2006-12-15 23:02:35.198219138 +1100
+++ quota/xfs_qm_bhv.c	2006-12-15 17:48:29.000000000 +1100
@@ -412,7 +412,7 @@
 };
 
 
-void __init
+static int __init
 xfs_qm_init(void)
 {
 	static char	message[] __initdata =
@@ -421,16 +421,22 @@
 	printk(message);
 	mutex_init(&xfs_Gqm_lock);
 	vfs_bhv_set_custom(&xfs_qmops, &xfs_qmcore_xfs);
+	bhv_module_init(XFS_QMOPS, THIS_MODULE, &xfs_qmops);
 	xfs_qm_init_procfs();
+	return 0;
 }
 
-void __exit
+static void __exit
 xfs_qm_exit(void)
 {
-	vfs_bhv_clr_custom(&xfs_qmops);
 	xfs_qm_cleanup_procfs();
+	bhv_module_exit(XFS_QMOPS);
+	vfs_bhv_clr_custom(&xfs_qmops);
 	if (qm_dqzone)
 		kmem_zone_destroy(qm_dqzone);
 	if (qm_dqtrxzone)
 		kmem_zone_destroy(qm_dqtrxzone);
 }
+
+module_init(xfs_qm_init);
+module_exit(xfs_qm_exit);