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: | 416 |
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 |
386 } 387 if (flag == 0) { 388 /* 389 * Don't begin transaction if we're getting starved for tlocks 390 * unless COMMIT_FORCE or COMMIT_INODE (which may ultimately 391 * free tlocks) 392 */ 393 if (TxAnchor.tlocksInUse > TxLockVHWM) { 394 INCREMENT(TxStat.txBegin_lockslow); 395 TXN_SLEEP(&TxAnchor.lowlockwait); 396 goto retry; 397 } 398 } 399 400 /* 401 * allocate transaction id/block 402 */ 403 if ((t = TxAnchor.freetid) == 0) { 404 jfs_info("txBegin: waiting for free tid"); 405 INCREMENT(TxStat.txBegin_freetid); 406 TXN_SLEEP(&TxAnchor.freewait); 407 goto retry; 408 } 409 410 tblk = tid_to_tblock(t); 411 412 if ((tblk->next == 0) && !(flag & COMMIT_FORCE)) { 413 /* Don't let a non-forced transaction take the last tblk */ 414 jfs_info("txBegin: waiting for free tid"); 415 INCREMENT(TxStat.txBegin_freetid); 416 TXN_SLEEP(&TxAnchor.freewait); 417 goto retry; 418 } 419 420 TxAnchor.freetid = tblk->next; 421 422 /* 423 * initialize transaction 424 */ 425 426 /*