Showing error 1348

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: fs/jbd2/transaction.c
Line in file: 479
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 449
 450        /* Wait until there are no running updates */
 451        while (1) {
 452                transaction_t *transaction = journal->j_running_transaction;
 453
 454                if (!transaction)
 455                        break;
 456
 457                spin_lock(&transaction->t_handle_lock);
 458                if (!transaction->t_updates) {
 459                        spin_unlock(&transaction->t_handle_lock);
 460                        break;
 461                }
 462                prepare_to_wait(&journal->j_wait_updates, &wait,
 463                                TASK_UNINTERRUPTIBLE);
 464                spin_unlock(&transaction->t_handle_lock);
 465                spin_unlock(&journal->j_state_lock);
 466                schedule();
 467                finish_wait(&journal->j_wait_updates, &wait);
 468                spin_lock(&journal->j_state_lock);
 469        }
 470        spin_unlock(&journal->j_state_lock);
 471
 472        /*
 473         * We have now established a barrier against other normal updates, but
 474         * we also need to barrier against other jbd2_journal_lock_updates() calls
 475         * to make sure that we serialise special journal-locked operations
 476         * too.
 477         */
 478        mutex_lock(&journal->j_barrier);
 479}
 480
 481/**
 482 * void jbd2_journal_unlock_updates (journal_t* journal) - release barrier
 483 * @journal:  Journal to release the barrier on.
 484 *
 485 * Release a transaction barrier obtained with jbd2_journal_lock_updates().
 486 *
 487 * Should be called without the journal lock held.
 488 */
 489void jbd2_journal_unlock_updates (journal_t *journal)
Show full sources