From e5570df295fc951546fec782bc087f72a47277e0 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 16 Aug 2023 15:05:18 -0400 Subject: [PATCH] bcachefs: stack_trace_save_tsk() depends on CONFIG_STACKTRACE Signed-off-by: Kent Overstreet --- fs/bcachefs/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index e4f21fcae944..1ab7e247cca6 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -269,6 +269,7 @@ void bch2_print_string_as_lines(const char *prefix, const char *lines) int bch2_save_backtrace(bch_stacktrace *stack, struct task_struct *task) { +#ifdef CONFIG_STACKTRACE unsigned nr_entries = 0; int ret = 0; @@ -289,6 +290,9 @@ int bch2_save_backtrace(bch_stacktrace *stack, struct task_struct *task) up_read(&task->signal->exec_update_lock); return ret; +#else + return 0; +#endif } void bch2_prt_backtrace(struct printbuf *out, bch_stacktrace *stack)