summaryrefslogtreecommitdiff
path: root/kernel/tsacct.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-10-24 16:47:56 +0200
committerArnd Bergmann <arnd@arndb.de>2019-12-18 18:07:31 +0100
commit352c912b0a525977a8e6fa1f87c15d9f71943642 (patch)
treed0059a3d25f1fae377e927c529e63defbf483265 /kernel/tsacct.c
parent2d602bf28316e2f61a553f13d279f3d74c2e5189 (diff)
downloadlwn-352c912b0a525977a8e6fa1f87c15d9f71943642.tar.gz
lwn-352c912b0a525977a8e6fa1f87c15d9f71943642.zip
tsacct: add 64-bit btime field
As there is only a 32-bit ac_btime field in taskstat and we should handle dates after the overflow, add a new field with the same information but 64-bit width that can hold a full time64_t. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel/tsacct.c')
-rw-r--r--kernel/tsacct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/tsacct.c b/kernel/tsacct.c
index ab12616ee6fb..257ffb993ea2 100644
--- a/kernel/tsacct.c
+++ b/kernel/tsacct.c
@@ -36,6 +36,7 @@ void bacct_add_tsk(struct user_namespace *user_ns,
/* Convert to seconds for btime (note y2106 limit) */
btime = ktime_get_real_seconds() - div_u64(delta, USEC_PER_SEC);
stats->ac_btime = clamp_t(time64_t, btime, 0, U32_MAX);
+ stats->ac_btime64 = btime;
if (thread_group_leader(tsk)) {
stats->ac_exitcode = tsk->exit_code;