Showing error 1039

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/jfs/jfs_txnmgr.c
Line in file: 861
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

 831        /* assert(jfs_ip->fileset == AGGREGATE_I); */
 832        if (jfs_ip->fileset != AGGREGATE_I) {
 833                printk(KERN_ERR "txLock: trying to lock locked page!");
 834                print_hex_dump(KERN_ERR, "ip: ", DUMP_PREFIX_ADDRESS, 16, 4,
 835                               ip, sizeof(*ip), 0);
 836                print_hex_dump(KERN_ERR, "mp: ", DUMP_PREFIX_ADDRESS, 16, 4,
 837                               mp, sizeof(*mp), 0);
 838                print_hex_dump(KERN_ERR, "Locker's tblock: ",
 839                               DUMP_PREFIX_ADDRESS, 16, 4, tid_to_tblock(tid),
 840                               sizeof(struct tblock), 0);
 841                print_hex_dump(KERN_ERR, "Tlock: ", DUMP_PREFIX_ADDRESS, 16, 4,
 842                               tlck, sizeof(*tlck), 0);
 843                BUG();
 844        }
 845        INCREMENT(stattx.waitlock);        /* statistics */
 846        TXN_UNLOCK();
 847        release_metapage(mp);
 848        TXN_LOCK();
 849        xtid = tlck->tid;        /* reacquire after dropping TXN_LOCK */
 850
 851        jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d",
 852                 tid, xtid, lid);
 853
 854        /* Recheck everything since dropping TXN_LOCK */
 855        if (xtid && (tlck->mp == mp) && (mp->lid == lid))
 856                TXN_SLEEP_DROP_LOCK(&tid_to_tblock(xtid)->waitor);
 857        else
 858                TXN_UNLOCK();
 859        jfs_info("txLock: awakened     tid = %d, lid = %d", tid, lid);
 860
 861        return NULL;
 862}
 863
 864/*
 865 * NAME:        txRelease()
 866 *
 867 * FUNCTION:        Release buffers associated with transaction locks, but don't
 868 *                mark homeok yet.  The allows other transactions to modify
 869 *                buffers, but won't let them go to disk until commit record
 870 *                actually gets written.
 871 *
Show full sources