acct: stop using get_seconds()
[linux-2.6-microblaze.git] / kernel / acct.c
index 81f9831..11ff4a5 100644 (file)
@@ -416,6 +416,7 @@ static void fill_ac(acct_t *ac)
 {
        struct pacct_struct *pacct = &current->signal->pacct;
        u64 elapsed, run_time;
+       time64_t btime;
        struct tty_struct *tty;
 
        /*
@@ -448,7 +449,8 @@ static void fill_ac(acct_t *ac)
        }
 #endif
        do_div(elapsed, AHZ);
-       ac->ac_btime = get_seconds() - elapsed;
+       btime = ktime_get_real_seconds() - elapsed;
+       ac->ac_btime = clamp_t(time64_t, btime, 0, U32_MAX);
 #if ACCT_VERSION==2
        ac->ac_ahz = AHZ;
 #endif