summaryrefslogtreecommitdiffstats
path: root/fs/pstore/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r--fs/pstore/platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 7798041f3fba..96fbff7b87c8 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -480,6 +480,12 @@ void pstore_record_init(struct pstore_record *record,
memset(record, 0, sizeof(*record));
record->psi = psinfo;
+
+ /* Report zeroed timestamp if called before timekeeping has resumed. */
+ if (__getnstimeofday(&record->time)) {
+ record->time.tv_sec = 0;
+ record->time.tv_nsec = 0;
+ }
}
/*