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>
This commit is contained in:
Mikulas Patocka 2015-11-23 19:12:05 -05:00 committed by Mike Snitzer
parent fe3265b180
commit 313c9b9736
1 changed files with 1 additions and 10 deletions

View File

@ -97,10 +97,6 @@ static void __del_holder(struct block_lock *lock, struct task_struct *task)
static int __check_holder(struct block_lock *lock) static int __check_holder(struct block_lock *lock)
{ {
unsigned i; unsigned i;
#ifdef CONFIG_DM_DEBUG_BLOCK_STACK_TRACING
static struct stack_trace t;
static stack_entries entries;
#endif
for (i = 0; i < MAX_HOLDERS; i++) { for (i = 0; i < MAX_HOLDERS; i++) {
if (lock->holders[i] == current) { if (lock->holders[i] == current) {
@ -110,12 +106,7 @@ static int __check_holder(struct block_lock *lock)
print_stack_trace(lock->traces + i, 4); print_stack_trace(lock->traces + i, 4);
DMERR("subsequent acquisition attempted here:"); DMERR("subsequent acquisition attempted here:");
t.nr_entries = 0; dump_stack();
t.max_entries = MAX_STACK;
t.entries = entries;
t.skip = 3;
save_stack_trace(&t);
print_stack_trace(&t, 4);
#endif #endif
return -EINVAL; return -EINVAL;
} }