[NET]: Convert init_timer into setup_timer
[deliverable/linux.git] / net / ipv4 / ipvs / ip_vs_lblcr.c
index 427b593c1069b82bab52215a16767db96fe6ae91..f50da6411378e521c6696b08995ae819f1274251 100644 (file)
@@ -302,7 +302,6 @@ struct ip_vs_lblcr_table {
 
 static ctl_table vs_vars_table[] = {
        {
-               .ctl_name       = NET_IPV4_VS_LBLCR_EXPIRE,
                .procname       = "lblcr_expiration",
                .data           = &sysctl_ip_vs_lblcr_expiration,
                .maxlen         = sizeof(int),
@@ -314,7 +313,6 @@ static ctl_table vs_vars_table[] = {
 
 static ctl_table vs_table[] = {
        {
-               .ctl_name       = NET_IPV4_VS,
                .procname       = "vs",
                .mode           = 0555,
                .child          = vs_vars_table
@@ -577,9 +575,8 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
        /*
         *    Hook periodic timer for garbage collection
         */
-       init_timer(&tbl->periodic_timer);
-       tbl->periodic_timer.data = (unsigned long)tbl;
-       tbl->periodic_timer.function = ip_vs_lblcr_check_expire;
+       setup_timer(&tbl->periodic_timer, ip_vs_lblcr_check_expire,
+                       (unsigned long)tbl);
        tbl->periodic_timer.expires = jiffies+CHECK_EXPIRE_INTERVAL;
        add_timer(&tbl->periodic_timer);
 
@@ -771,9 +768,14 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
 
 static int __init ip_vs_lblcr_init(void)
 {
+       int ret;
+
        INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list);
        sysctl_header = register_sysctl_table(lblcr_root_table);
-       return register_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
+       ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
+       if (ret)
+               unregister_sysctl_table(sysctl_header);
+       return ret;
 }
 
 
This page took 0.024823 seconds and 5 git commands to generate.