]> Git Repo - linux.git/commit
[PATCH] ext3/4: fix J_ASSERT(transaction->t_updates > 0) in journal_stop()
authorOGAWA Hirofumi <[email protected]>
Fri, 20 Oct 2006 06:29:11 +0000 (23:29 -0700)
committerLinus Torvalds <[email protected]>
Fri, 20 Oct 2006 17:26:44 +0000 (10:26 -0700)
commit3e2a532b26b491706bd8b5c7cfc8d767b43b8f36
tree641db5da4c1adbeee04ce6594746cec51f581ff0
parent82591e6ea234762eeaa8b2337fe060ed438c18dc
[PATCH] ext3/4: fix J_ASSERT(transaction->t_updates > 0) in journal_stop()

A disk generated some I/O error, after it, I hitted
J_ASSERT(transaction->t_updates > 0) in journal_stop().

It seems to happened on ext3_truncate() path from stack trace. Then,
maybe the following case may trigger J_ASSERT(transaction->t_updates > 0).

ext3_truncate()
    -> ext3_free_branches()
        -> ext3_journal_test_restart()
    -> ext3_journal_restart()
                -> journal_restart()
                transaction->t_updates--;
                /* another process aborted journal */
                    -> start_this_handle()
    returns -EROFS without transaction->t_updates++;

    -> ext3_journal_stop()
        -> journal_stop()
J_ASSERT(transaction->t_updates > 0)

If journal was aborted in middle of journal_restart(), ext3_truncate()
may trigger J_ASSERT().

Signed-off-by: OGAWA Hirofumi <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/jbd/transaction.c
fs/jbd2/transaction.c
This page took 0.056165 seconds and 4 git commands to generate.