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: | 395 |
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 |
365 struct tblock *tblk; 366 struct jfs_log *log; 367 368 jfs_info("txBegin: flag = 0x%x", flag); 369 log = JFS_SBI(sb)->log; 370 371 TXN_LOCK(); 372 373 INCREMENT(TxStat.txBegin); 374 375 retry: 376 if (!(flag & COMMIT_FORCE)) { 377 /* 378 * synchronize with logsync barrier 379 */ 380 if (test_bit(log_SYNCBARRIER, &log->flag) || 381 test_bit(log_QUIESCE, &log->flag)) { 382 INCREMENT(TxStat.txBegin_barrier); 383 TXN_SLEEP(&log->syncwait); 384 goto retry; 385 } 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);