aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/journal.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-29 11:19:50 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-13 12:23:53 -0400
commit8ff83089f8bcbd9a2e898b68f1a46487c8b6e38c (patch)
tree36b286946894a4b797d850cca67603cac89ec1f2 /fs/ubifs/journal.c
parentb137545c44fc0c80fb778abb0c582bda5601e8f8 (diff)
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>
Diffstat (limited to 'fs/ubifs/journal.c')
-rw-r--r--fs/ubifs/journal.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index aed25e864227..65d485fc1eeb 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -380,10 +380,8 @@ out:
380 if (err == -ENOSPC) { 380 if (err == -ENOSPC) {
381 /* This are some budgeting problems, print useful information */ 381 /* This are some budgeting problems, print useful information */
382 down_write(&c->commit_sem); 382 down_write(&c->commit_sem);
383 spin_lock(&c->space_lock);
384 dbg_dump_stack(); 383 dbg_dump_stack();
385 dbg_dump_budg(c); 384 dbg_dump_budg(c);
386 spin_unlock(&c->space_lock);
387 dbg_dump_lprops(c); 385 dbg_dump_lprops(c);
388 cmt_retries = dbg_check_lprops(c); 386 cmt_retries = dbg_check_lprops(c);
389 up_write(&c->commit_sem); 387 up_write(&c->commit_sem);