Showing error 1347

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/jbd/transaction.c
Line in file: 469
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

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