From df32b5fa2298dab7fb3ee955c3f496570c20d5de Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 31 Jan 2017 20:34:27 +0100 Subject: btrfs-progs: kerncompat: print trace from ASSERT, if enabled Commit bc2d4ccc46e2807964c74ce805fb6405ca2bc842 "btrfs-progs: kerncompat: disconnect assert and warning messages" forgot to add the print_trace call to assert_trace. Signed-off-by: David Sterba --- kerncompat.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kerncompat.h') diff --git a/kerncompat.h b/kerncompat.h index 1493cad8..958bea43 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -299,6 +299,9 @@ static inline void assert_trace(const char *assertion, const char *filename, fprintf(stderr, "%s:%d: %s: Assertion `%s` failed, value %ld\n", filename, line, func, assertion, val); +#ifndef BTRFS_DISABLE_BACKTRACE + print_trace(); +#endif abort(); exit(1); } -- cgit v1.2.3