]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_sysctl.c
[XFS] streamline init/exit path
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_sysctl.c
index cd6eaa44aa2be069875dd56c5d1eb6847d291e8b..7dacb5bbde3f30123da154cc1fb3563046b694af 100644 (file)
@@ -210,6 +210,17 @@ static ctl_table xfs_table[] = {
                .extra1         = &xfs_params.inherit_nodfrg.min,
                .extra2         = &xfs_params.inherit_nodfrg.max
        },
+       {
+               .ctl_name       = XFS_FILESTREAM_TIMER,
+               .procname       = "filestream_centisecs",
+               .data           = &xfs_params.fstrm_timer.val,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec_minmax,
+               .strategy       = &sysctl_intvec,
+               .extra1         = &xfs_params.fstrm_timer.min,
+               .extra2         = &xfs_params.fstrm_timer.max,
+       },
        /* please keep this the last entry */
 #ifdef CONFIG_PROC_FS
        {
@@ -248,15 +259,17 @@ static ctl_table xfs_root_table[] = {
        {}
 };
 
-void
+int
 xfs_sysctl_register(void)
 {
        xfs_table_header = register_sysctl_table(xfs_root_table);
+       if (!xfs_table_header)
+               return -ENOMEM;
+       return 0;
 }
 
 void
 xfs_sysctl_unregister(void)
 {
-       if (xfs_table_header)
-               unregister_sysctl_table(xfs_table_header);
+       unregister_sysctl_table(xfs_table_header);
 }