Showing error 1138

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/jfs/namei.c
Line in file: 1299
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-29 14:49:11 UTC


Source:

1269
1270        if (old_dir != new_dir) {
1271                iplist[ipcount++] = new_dir;
1272                old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
1273                mark_inode_dirty(old_dir);
1274        }
1275
1276        /*
1277         * Incomplete truncate of file data can
1278         * result in timing problems unless we synchronously commit the
1279         * transaction.
1280         */
1281        if (new_size)
1282                commit_flag = COMMIT_SYNC;
1283        else
1284                commit_flag = 0;
1285
1286        rc = txCommit(tid, ipcount, iplist, commit_flag);
1287
1288      out4:
1289        txEnd(tid);
1290        if (new_ip)
1291                mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
1292        if (old_dir != new_dir)
1293                mutex_unlock(&JFS_IP(old_dir)->commit_mutex);
1294        mutex_unlock(&JFS_IP(old_ip)->commit_mutex);
1295        mutex_unlock(&JFS_IP(new_dir)->commit_mutex);
1296
1297        while (new_size && (rc == 0)) {
1298                tid = txBegin(new_ip->i_sb, 0);
1299                mutex_lock(&JFS_IP(new_ip)->commit_mutex);
1300                new_size = xtTruncate_pmap(tid, new_ip, new_size);
1301                if (new_size < 0) {
1302                        txAbort(tid, 1);
1303                        rc = new_size;
1304                } else
1305                        rc = txCommit(tid, 1, &new_ip, COMMIT_SYNC);
1306                txEnd(tid);
1307                mutex_unlock(&JFS_IP(new_ip)->commit_mutex);
1308        }
1309        if (new_ip && (new_ip->i_nlink == 0))
Show full sources