From 9733ac333081fb6eeb03d674e80bed5879f7ed1e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 4 Aug 2013 09:03:03 +0800 Subject: [PATCH] staging: lustre: remove strange journal macros into the one file using them This moves the PUSH_JOURNAL and friend macros into debug.c, as that's the only place they are used, so why are they even a macro? Cc: Peng Tao Cc: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- .../lustre/include/linux/libcfs/linux/linux-prim.h | 9 --------- drivers/staging/lustre/lustre/libcfs/debug.c | 8 +++++--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h index c78f71a23592..383198acb1f4 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h @@ -85,13 +85,4 @@ LL_PROC_PROTO(name) \ */ typedef struct proc_dir_entry proc_dir_entry_t; -#define DECL_JOURNAL_DATA void *journal_info -#define PUSH_JOURNAL do { \ - journal_info = current->journal_info; \ - current->journal_info = NULL; \ - } while(0) -#define POP_JOURNAL do { \ - current->journal_info = journal_info; \ - } while(0) - #endif diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index f7216de4cb4f..9b9c45116eee 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c @@ -335,9 +335,10 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys) */ void libcfs_debug_dumplog_internal(void *arg) { - DECL_JOURNAL_DATA; + void *journal_info; - PUSH_JOURNAL; + journal_info = current->journal_info; + current->journal_info = NULL; if (strncmp(libcfs_debug_file_path_arr, "NONE", 4) != 0) { snprintf(debug_file_name, sizeof(debug_file_name) - 1, @@ -348,7 +349,8 @@ void libcfs_debug_dumplog_internal(void *arg) cfs_tracefile_dump_all_pages(debug_file_name); libcfs_run_debug_log_upcall(debug_file_name); } - POP_JOURNAL; + + current->journal_info = journal_info; } int libcfs_debug_dumplog_thread(void *arg) -- 2.34.1