Showing error 1194

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/jffs2/gc.c
Line in file: 302
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

 272                        /* Just mark it obsolete */
 273                        jffs2_mark_node_obsolete(c, raw);
 274                }
 275                mutex_unlock(&c->alloc_sem);
 276                goto eraseit_lock;
 277        }
 278
 279        ic = jffs2_raw_ref_to_ic(raw);
 280
 281#ifdef CONFIG_JFFS2_FS_XATTR
 282        /* When 'ic' refers xattr_datum/xattr_ref, this node is GCed as xattr.
 283         * We can decide whether this node is inode or xattr by ic->class.     */
 284        if (ic->class == RAWNODE_CLASS_XATTR_DATUM
 285            || ic->class == RAWNODE_CLASS_XATTR_REF) {
 286                spin_unlock(&c->erase_completion_lock);
 287
 288                if (ic->class == RAWNODE_CLASS_XATTR_DATUM) {
 289                        ret = jffs2_garbage_collect_xattr_datum(c, (struct jffs2_xattr_datum *)ic, raw);
 290                } else {
 291                        ret = jffs2_garbage_collect_xattr_ref(c, (struct jffs2_xattr_ref *)ic, raw);
 292                }
 293                goto test_gcnode;
 294        }
 295#endif
 296
 297        /* We need to hold the inocache. Either the erase_completion_lock or
 298           the inocache_lock are sufficient; we trade down since the inocache_lock
 299           causes less contention. */
 300        spin_lock(&c->inocache_lock);
 301
 302        spin_unlock(&c->erase_completion_lock);
 303
 304        D1(printk(KERN_DEBUG "jffs2_garbage_collect_pass collecting from block @0x%08x. Node @0x%08x(%d), ino #%u\n", jeb->offset, ref_offset(raw), ref_flags(raw), ic->ino));
 305
 306        /* Three possibilities:
 307           1. Inode is already in-core. We must iget it and do proper
 308              updating to its fragtree, etc.
 309           2. Inode is not in-core, node is REF_PRISTINE. We lock the
 310              inocache to prevent a read_inode(), copy the node intact.
 311           3. Inode is not in-core, node is not pristine. We must iget()
 312              and take the slow path.
Show full sources