Commit-ID:  6924f5feba21ea2bba64b4dc316ee046c48355ca
Gitweb:     https://git.kernel.org/tip/6924f5feba21ea2bba64b4dc316ee046c48355ca
Author:     Thomas Gleixner <[email protected]>
AuthorDate: Thu, 25 Apr 2019 11:45:06 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 29 Apr 2019 12:37:51 +0200

btrfs: ref-verify: Simplify stack trace retrieval

Replace the indirection through struct stack_trace with an invocation of
the storage array based interface.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Josh Poimboeuf <[email protected]>
Acked-by: David Sterba <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: [email protected]
Cc: Steven Rostedt <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: [email protected]
Cc: David Rientjes <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: [email protected]
Cc: Mike Rapoport <[email protected]>
Cc: Akinobu Mita <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: [email protected]
Cc: Robin Murphy <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: [email protected]
Cc: Mike Snitzer <[email protected]>
Cc: Alasdair Kergon <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
Cc: Joonas Lahtinen <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: [email protected]
Cc: David Airlie <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Miroslav Benes <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]

---
 fs/btrfs/ref-verify.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
index d09b6cdb785a..b283d3a6e837 100644
--- a/fs/btrfs/ref-verify.c
+++ b/fs/btrfs/ref-verify.c
@@ -205,28 +205,17 @@ static struct root_entry *lookup_root_entry(struct 
rb_root *root, u64 objectid)
 #ifdef CONFIG_STACKTRACE
 static void __save_stack_trace(struct ref_action *ra)
 {
-       struct stack_trace stack_trace;
-
-       stack_trace.max_entries = MAX_TRACE;
-       stack_trace.nr_entries = 0;
-       stack_trace.entries = ra->trace;
-       stack_trace.skip = 2;
-       save_stack_trace(&stack_trace);
-       ra->trace_len = stack_trace.nr_entries;
+       ra->trace_len = stack_trace_save(ra->trace, MAX_TRACE, 2);
 }
 
 static void __print_stack_trace(struct btrfs_fs_info *fs_info,
                                struct ref_action *ra)
 {
-       struct stack_trace trace;
-
        if (ra->trace_len == 0) {
                btrfs_err(fs_info, "  ref-verify: no stacktrace");
                return;
        }
-       trace.nr_entries = ra->trace_len;
-       trace.entries = ra->trace;
-       print_stack_trace(&trace, 2);
+       stack_trace_print(ra->trace, ra->trace_len, 2);
 }
 #else
 static void inline __save_stack_trace(struct ref_action *ra)

Reply via email to