diff options
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index c58867cbd019..aad4fb80d187 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -610,7 +610,7 @@ void dbg_dump_budg(struct ubifs_info *c) | |||
610 | struct ubifs_gced_idx_leb *idx_gc; | 610 | struct ubifs_gced_idx_leb *idx_gc; |
611 | long long available, outstanding, free; | 611 | long long available, outstanding, free; |
612 | 612 | ||
613 | ubifs_assert(spin_is_locked(&c->space_lock)); | 613 | spin_lock(&c->space_lock); |
614 | spin_lock(&dbg_lock); | 614 | spin_lock(&dbg_lock); |
615 | printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, " | 615 | printk(KERN_DEBUG "(pid %d) Budgeting info: budg_data_growth %lld, " |
616 | "budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid, | 616 | "budg_dd_growth %lld, budg_idx_growth %lld\n", current->pid, |
@@ -655,6 +655,7 @@ void dbg_dump_budg(struct ubifs_info *c) | |||
655 | printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n", | 655 | printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n", |
656 | available, outstanding, free); | 656 | available, outstanding, free); |
657 | spin_unlock(&dbg_lock); | 657 | spin_unlock(&dbg_lock); |
658 | spin_unlock(&c->space_lock); | ||
658 | } | 659 | } |
659 | 660 | ||
660 | void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp) | 661 | void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp) |
@@ -1046,10 +1047,7 @@ out: | |||
1046 | 1047 | ||
1047 | ubifs_msg("current lprops statistics dump"); | 1048 | ubifs_msg("current lprops statistics dump"); |
1048 | dbg_dump_lstats(&lst); | 1049 | dbg_dump_lstats(&lst); |
1049 | |||
1050 | spin_lock(&c->space_lock); | ||
1051 | dbg_dump_budg(c); | 1050 | dbg_dump_budg(c); |
1052 | spin_unlock(&c->space_lock); | ||
1053 | dump_stack(); | 1051 | dump_stack(); |
1054 | return -EINVAL; | 1052 | return -EINVAL; |
1055 | } | 1053 | } |
@@ -2796,11 +2794,9 @@ static ssize_t write_debugfs_file(struct file *file, const char __user *buf, | |||
2796 | 2794 | ||
2797 | if (file->f_path.dentry == d->dfs_dump_lprops) | 2795 | if (file->f_path.dentry == d->dfs_dump_lprops) |
2798 | dbg_dump_lprops(c); | 2796 | dbg_dump_lprops(c); |
2799 | else if (file->f_path.dentry == d->dfs_dump_budg) { | 2797 | else if (file->f_path.dentry == d->dfs_dump_budg) |
2800 | spin_lock(&c->space_lock); | ||
2801 | dbg_dump_budg(c); | 2798 | dbg_dump_budg(c); |
2802 | spin_unlock(&c->space_lock); | 2799 | else if (file->f_path.dentry == d->dfs_dump_tnc) { |
2803 | } else if (file->f_path.dentry == d->dfs_dump_tnc) { | ||
2804 | mutex_lock(&c->tnc_mutex); | 2800 | mutex_lock(&c->tnc_mutex); |
2805 | dbg_dump_tnc(c); | 2801 | dbg_dump_tnc(c); |
2806 | mutex_unlock(&c->tnc_mutex); | 2802 | mutex_unlock(&c->tnc_mutex); |