Skip to content

Commit 6924f5f

Browse files
committed
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 <tglx@linutronix.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: David Sterba <dsterba@suse.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <josef@toxicpanda.com> Cc: linux-btrfs@vger.kernel.org Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Alexander Potapenko <glider@google.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: linux-mm@kvack.org Cc: David Rientjes <rientjes@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: kasan-dev@googlegroups.com Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Christoph Hellwig <hch@lst.de> Cc: iommu@lists.linux-foundation.org Cc: Robin Murphy <robin.murphy@arm.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: dm-devel@redhat.com Cc: Mike Snitzer <snitzer@redhat.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: intel-gfx@lists.freedesktop.org Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Tom Zanussi <tom.zanussi@linux.intel.com> Cc: Miroslav Benes <mbenes@suse.cz> Cc: linux-arch@vger.kernel.org Link: https://lkml.kernel.org/r/20190425094802.338890064@linutronix.de
1 parent 746017e commit 6924f5f

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

‎fs/btrfs/ref-verify.c‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,28 +205,17 @@ static struct root_entry *lookup_root_entry(struct rb_root *root, u64 objectid)
205205
#ifdef CONFIG_STACKTRACE
206206
static void __save_stack_trace(struct ref_action *ra)
207207
{
208-
struct stack_trace stack_trace;
209-
210-
stack_trace.max_entries = MAX_TRACE;
211-
stack_trace.nr_entries = 0;
212-
stack_trace.entries = ra->trace;
213-
stack_trace.skip = 2;
214-
save_stack_trace(&stack_trace);
215-
ra->trace_len = stack_trace.nr_entries;
208+
ra->trace_len = stack_trace_save(ra->trace, MAX_TRACE, 2);
216209
}
217210

218211
static void __print_stack_trace(struct btrfs_fs_info *fs_info,
219212
struct ref_action *ra)
220213
{
221-
struct stack_trace trace;
222-
223214
if (ra->trace_len == 0) {
224215
btrfs_err(fs_info, " ref-verify: no stacktrace");
225216
return;
226217
}
227-
trace.nr_entries = ra->trace_len;
228-
trace.entries = ra->trace;
229-
print_stack_trace(&trace, 2);
218+
stack_trace_print(ra->trace, ra->trace_len, 2);
230219
}
231220
#else
232221
static void inline __save_stack_trace(struct ref_action *ra)

0 commit comments

Comments
 (0)