UBIFS: simplify dbg_dump_budg calling conventions
The current 'dbg_dump_budg()' calling convention is that the 'c->space_lock' spinlock is held. However, none of the callers actually use it from contects which have 'c->space_lock' locked, so all callers have to explicitely lock and unlock the spinlock. This is not very sensible convention. This patch changes it and makes 'dbg_dump_budg()' lock the spinlock instead of imposing this to the callers. This simplifies the code a little. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -380,10 +380,8 @@ out:
|
||||
if (err == -ENOSPC) {
|
||||
/* This are some budgeting problems, print useful information */
|
||||
down_write(&c->commit_sem);
|
||||
spin_lock(&c->space_lock);
|
||||
dbg_dump_stack();
|
||||
dbg_dump_budg(c);
|
||||
spin_unlock(&c->space_lock);
|
||||
dbg_dump_lprops(c);
|
||||
cmt_retries = dbg_check_lprops(c);
|
||||
up_write(&c->commit_sem);
|
||||
|
Reference in New Issue
Block a user