Commit 589bfa37 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 80018a9e
...@@ -452,8 +452,8 @@ void libcfs_debug_dumplog_internal(void *arg) ...@@ -452,8 +452,8 @@ void libcfs_debug_dumplog_internal(void *arg)
if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0) { if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0) {
snprintf(debug_file_name, sizeof(debug_file_name) - 1, snprintf(debug_file_name, sizeof(debug_file_name) - 1,
"%s.%ld.%ld", libcfs_debug_file_path_arr, "%s.%lld.%ld", libcfs_debug_file_path_arr,
get_seconds(), (long_ptr_t)arg); (s64)ktime_get_real_seconds(), (long_ptr_t)arg);
pr_alert("LustreError: dumping log to %s\n", pr_alert("LustreError: dumping log to %s\n",
debug_file_name); debug_file_name);
cfs_tracefile_dump_all_pages(debug_file_name); cfs_tracefile_dump_all_pages(debug_file_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment