Skip to content

Commit 313c9b9

Browse files
Mikulas Patockasnitm
authored andcommitted
dm block manager: cleanup code that prints stacktrace
There is no need to record stack trace and immediately print it. Just use dump_stack() to print the current stack. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent fe3265b commit 313c9b9

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

drivers/md/persistent-data/dm-block-manager.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ static void __del_holder(struct block_lock *lock, struct task_struct *task)
9797
static int __check_holder(struct block_lock *lock)
9898
{
9999
unsigned i;
100-
#ifdef CONFIG_DM_DEBUG_BLOCK_STACK_TRACING
101-
static struct stack_trace t;
102-
static stack_entries entries;
103-
#endif
104100

105101
for (i = 0; i < MAX_HOLDERS; i++) {
106102
if (lock->holders[i] == current) {
@@ -110,12 +106,7 @@ static int __check_holder(struct block_lock *lock)
110106
print_stack_trace(lock->traces + i, 4);
111107

112108
DMERR("subsequent acquisition attempted here:");
113-
t.nr_entries = 0;
114-
t.max_entries = MAX_STACK;
115-
t.entries = entries;
116-
t.skip = 3;
117-
save_stack_trace(&t);
118-
print_stack_trace(&t, 4);
109+
dump_stack();
119110
#endif
120111
return -EINVAL;
121112
}

0 commit comments

Comments
 (0)