aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2015-09-27 16:45:25 -0400
committerGreg Kroah-Hartman <[email protected]>2015-09-29 04:03:38 +0200
commit589bfa37692c61e6f07ed0d65fbfbd478694bc22 (patch)
treefc37040889e61b0abccd3bc524fc2f0bae1657e3
parent80018a9edbc3180ae31a7197f9dacab975a7f5e2 (diff)
staging/lustre: use 64-bit times in debug print
This adapts the format string and get_seconds() call to not overflow in 2038 in the libcfs_debug_dumplog_internal() function. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/libcfs/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index e93f556fac0d..ae325f750eeb 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -452,8 +452,8 @@ void libcfs_debug_dumplog_internal(void *arg)
if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0) {
snprintf(debug_file_name, sizeof(debug_file_name) - 1,
- "%s.%ld.%ld", libcfs_debug_file_path_arr,
- get_seconds(), (long_ptr_t)arg);
+ "%s.%lld.%ld", libcfs_debug_file_path_arr,
+ (s64)ktime_get_real_seconds(), (long_ptr_t)arg);
pr_alert("LustreError: dumping log to %s\n",
debug_file_name);
cfs_tracefile_dump_all_pages(debug_file_name);