From: Mr NeilBrown Date: Mon, 6 Jul 2020 12:34:44 +0000 (-0400) Subject: LU-9859 libcfs: don't save journal_info in dumplog thread. X-Git-Tag: 2.13.56~96 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2eba3f9c3de506d0802d401dda5f45033b96587e LU-9859 libcfs: don't save journal_info in dumplog thread. As this thread is started by kthread, it must have a clean environment and cannot possibly be in a filesystem transaction. So current->journal_info must be NULL, and preserving it serves no purpose. Also change libcfs_debug_dumplog_internal() to 'static' to make it clear that it shouldn't be called from anywhere but this thread. Signed-off-by: Mr NeilBrown Change-Id: Ie863f792b36792600bef4fe778c46e97ebf046c3 Reviewed-on: https://review.whamcloud.com/39294 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- diff --git a/libcfs/libcfs/debug.c b/libcfs/libcfs/debug.c index 09e3db7..c45ef08 100644 --- a/libcfs/libcfs/debug.c +++ b/libcfs/libcfs/debug.c @@ -395,14 +395,11 @@ static void libcfs_run_debug_log_upcall(char *file) /** * Dump Lustre log to ::debug_file_path by calling tracefile_dump_all_pages() */ -void libcfs_debug_dumplog_internal(void *arg) +static void libcfs_debug_dumplog_internal(void *arg) { static time64_t last_dump_time; time64_t current_time; - void *journal_info; - journal_info = current->journal_info; - current->journal_info = NULL; current_time = ktime_get_real_seconds(); if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0 && @@ -415,8 +412,6 @@ void libcfs_debug_dumplog_internal(void *arg) cfs_tracefile_dump_all_pages(debug_file_name); libcfs_run_debug_log_upcall(debug_file_name); } - - current->journal_info = journal_info; } static int libcfs_debug_dumplog_thread(void *arg) diff --git a/libcfs/libcfs/tracefile.h b/libcfs/libcfs/tracefile.h index 0ab2aec..8413413 100644 --- a/libcfs/libcfs/tracefile.h +++ b/libcfs/libcfs/tracefile.h @@ -65,7 +65,6 @@ int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob); int cfs_trace_set_debug_mb(int mb); int cfs_trace_get_debug_mb(void); -extern void libcfs_debug_dumplog_internal(void *arg); extern int libcfs_panic_in_progress; #define TCD_MAX_PAGES (5 << (20 - PAGE_SHIFT))