diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2015-11-23 19:12:05 -0500 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2015-12-10 10:38:56 -0500 |
| commit | 313c9b97361fca3a606fc74de86bee6dc7988bca (patch) | |
| tree | 0809a86dca1f372844868bebbc54e4de7db23366 /drivers/md/persistent-data | |
| parent | fe3265b180d6282648f03bc6ac3958c733df01c2 (diff) | |
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>
Diffstat (limited to 'drivers/md/persistent-data')
| -rw-r--r-- | drivers/md/persistent-data/dm-block-manager.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index f2393ba838eb..1e33dd51c21f 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c | |||
| @@ -97,10 +97,6 @@ static void __del_holder(struct block_lock *lock, struct task_struct *task) | |||
| 97 | static int __check_holder(struct block_lock *lock) | 97 | static int __check_holder(struct block_lock *lock) |
| 98 | { | 98 | { |
| 99 | unsigned i; | 99 | unsigned i; |
| 100 | #ifdef CONFIG_DM_DEBUG_BLOCK_STACK_TRACING | ||
| 101 | static struct stack_trace t; | ||
| 102 | static stack_entries entries; | ||
| 103 | #endif | ||
| 104 | 100 | ||
| 105 | for (i = 0; i < MAX_HOLDERS; i++) { | 101 | for (i = 0; i < MAX_HOLDERS; i++) { |
| 106 | if (lock->holders[i] == current) { | 102 | if (lock->holders[i] == current) { |
| @@ -110,12 +106,7 @@ static int __check_holder(struct block_lock *lock) | |||
| 110 | print_stack_trace(lock->traces + i, 4); | 106 | print_stack_trace(lock->traces + i, 4); |
| 111 | 107 | ||
| 112 | DMERR("subsequent acquisition attempted here:"); | 108 | DMERR("subsequent acquisition attempted here:"); |
| 113 | t.nr_entries = 0; | 109 | dump_stack(); |
| 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); | ||
| 119 | #endif | 110 | #endif |
| 120 | return -EINVAL; | 111 | return -EINVAL; |
| 121 | } | 112 | } |
