Showing error 900

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: 204
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Clang Static Analyzer (3.0)
Entered: 2012-02-27 21:22:42 UTC


Source:

 174                struct tblock * tblk);
 175static void txForce(struct tblock * tblk);
 176static int txLog(struct jfs_log * log, struct tblock * tblk,
 177                struct commit * cd);
 178static void txUpdateMap(struct tblock * tblk);
 179static void txRelease(struct tblock * tblk);
 180static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
 181           struct tlock * tlck);
 182static void LogSyncRelease(struct metapage * mp);
 183
 184/*
 185 *                transaction block/lock management
 186 *                ---------------------------------
 187 */
 188
 189/*
 190 * Get a transaction lock from the free list.  If the number in use is
 191 * greater than the high water mark, wake up the sync daemon.  This should
 192 * free some anonymous transaction locks.  (TXN_LOCK must be held.)
 193 */
 194static lid_t txLockAlloc(void)
 195{
 196        lid_t lid;
 197
 198        INCREMENT(TxStat.txLockAlloc);
 199        if (!TxAnchor.freelock) {
 200                INCREMENT(TxStat.txLockAlloc_freelock);
 201        }
 202
 203        while (!(lid = TxAnchor.freelock))
 204                TXN_SLEEP(&TxAnchor.freelockwait);
 205        TxAnchor.freelock = TxLock[lid].next;
 206        HIGHWATERMARK(stattx.maxlid, lid);
 207        if ((++TxAnchor.tlocksInUse > TxLockHWM) && (jfs_tlocks_low == 0)) {
 208                jfs_info("txLockAlloc tlocks low");
 209                jfs_tlocks_low = 1;
 210                wake_up_process(jfsSyncThread);
 211        }
 212
 213        return lid;
 214}
Show full sources