bsdacct: make check timer accept a bsd_acct_struct argument
[linux-2.6-block.git] / kernel / acct.c
index 91e1cfd734d286f922597108e54065ef691d31b2..05f8bc094a4ba8b963afc5def9a4b8d68e904a23 100644 (file)
@@ -82,7 +82,7 @@ static void do_acct_process(struct pid_namespace *ns, struct file *);
  * can be placed in the same cache line as the lock.  This primes
  * the cache line to have the data after getting the lock.
  */
-struct acct_glbs {
+struct bsd_acct_struct {
        spinlock_t              lock;
        volatile int            active;
        volatile int            needcheck;
@@ -91,15 +91,16 @@ struct acct_glbs {
        struct timer_list       timer;
 };
 
-static struct acct_glbs acct_globals __cacheline_aligned =
+static struct bsd_acct_struct acct_globals __cacheline_aligned =
        {__SPIN_LOCK_UNLOCKED(acct_globals.lock)};
 
 /*
  * Called whenever the timer says to check the free space.
  */
-static void acct_timeout(unsigned long unused)
+static void acct_timeout(unsigned long x)
 {
-       acct_globals.needcheck = 1;
+       struct bsd_acct_struct *acct = (struct bsd_acct_struct *)x;
+       acct->needcheck = 1;
 }
 
 /*
@@ -193,8 +194,8 @@ static void acct_file_reopen(struct file *file)
                acct_globals.needcheck = 0;
                acct_globals.active = 1;
                /* It's been deleted if it was used before so this is safe */
-               init_timer(&acct_globals.timer);
-               acct_globals.timer.function = acct_timeout;
+               setup_timer(&acct_globals.timer, acct_timeout,
+                               (unsigned long)&acct_globals);
                acct_globals.timer.expires = jiffies + ACCT_TIMEOUT*HZ;
                add_timer(&acct_globals.timer);
        }
@@ -579,7 +580,6 @@ void acct_collect(long exitcode, int group_dead)
 
 /**
  * acct_process - now just a wrapper around do_acct_process
- * @exitcode: task exit code
  *
  * handles process accounting for an exiting task
  */