patch-2.4.0-test1 linux/kernel/acct.c

Next file: linux/kernel/ksyms.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre9/linux/kernel/acct.c linux/kernel/acct.c
@@ -71,7 +71,7 @@
 static volatile int acct_active;
 static volatile int acct_needcheck;
 static struct file *acct_file;
-static struct timer_list acct_timer = { NULL, NULL, 0, 0, acct_timeout };
+static struct timer_list acct_timer;
 static int do_acct_process(long, struct file *);
 
 /*
@@ -180,6 +180,9 @@
 		acct_file = file;
 		acct_needcheck = 0;
 		acct_active = 1;
+		/* Its been deleted if it was used before so this is safe */
+		init_timer(&acct_timer);
+		acct_timer.function = acct_timeout;
 		acct_timer.expires = jiffies + ACCT_TIMEOUT*HZ;
 		add_timer(&acct_timer);
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)