Showing error 910

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/jfs/jfs_txnmgr.c
Line in file: 477
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Clang Static Analyzer (3.0)
Smatch (1.59)
Entered: 2012-02-27 21:22:42 UTC


Source:

 447        return t;
 448}
 449
 450/*
 451 * NAME:        txBeginAnon()
 452 *
 453 * FUNCTION:        start an anonymous transaction.
 454 *                Blocks if logsync or available tlocks are low to prevent
 455 *                anonymous tlocks from depleting supply.
 456 *
 457 * PARAMETER:        sb        - superblock
 458 *
 459 * RETURN:        none
 460 */
 461void txBeginAnon(struct super_block *sb)
 462{
 463        struct jfs_log *log;
 464
 465        log = JFS_SBI(sb)->log;
 466
 467        TXN_LOCK();
 468        INCREMENT(TxStat.txBeginAnon);
 469
 470      retry:
 471        /*
 472         * synchronize with logsync barrier
 473         */
 474        if (test_bit(log_SYNCBARRIER, &log->flag) ||
 475            test_bit(log_QUIESCE, &log->flag)) {
 476                INCREMENT(TxStat.txBeginAnon_barrier);
 477                TXN_SLEEP(&log->syncwait);
 478                goto retry;
 479        }
 480
 481        /*
 482         * Don't begin transaction if we're getting starved for tlocks
 483         */
 484        if (TxAnchor.tlocksInUse > TxLockVHWM) {
 485                INCREMENT(TxStat.txBeginAnon_lockslow);
 486                TXN_SLEEP(&TxAnchor.lowlockwait);
 487                goto retry;
Show full sources