Showing error 1195

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: 257
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

 227                        mutex_unlock(&c->alloc_sem);
 228                        return -EAGAIN;
 229                }
 230                D1(printk(KERN_NOTICE "jffs2: Couldn't find erase block to garbage collect!\n"));
 231                spin_unlock(&c->erase_completion_lock);
 232                mutex_unlock(&c->alloc_sem);
 233                return -EIO;
 234        }
 235
 236        D1(printk(KERN_DEBUG "GC from block %08x, used_size %08x, dirty_size %08x, free_size %08x\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size));
 237        D1(if (c->nextblock)
 238           printk(KERN_DEBUG "Nextblock at  %08x, used_size %08x, dirty_size %08x, wasted_size %08x, free_size %08x\n", c->nextblock->offset, c->nextblock->used_size, c->nextblock->dirty_size, c->nextblock->wasted_size, c->nextblock->free_size));
 239
 240        if (!jeb->used_size) {
 241                mutex_unlock(&c->alloc_sem);
 242                goto eraseit;
 243        }
 244
 245        raw = jeb->gc_node;
 246        gcblock_dirty = jeb->dirty_size;
 247
 248        while(ref_obsolete(raw)) {
 249                D1(printk(KERN_DEBUG "Node at 0x%08x is obsolete... skipping\n", ref_offset(raw)));
 250                raw = ref_next(raw);
 251                if (unlikely(!raw)) {
 252                        printk(KERN_WARNING "eep. End of raw list while still supposedly nodes to GC\n");
 253                        printk(KERN_WARNING "erase block at 0x%08x. free_size 0x%08x, dirty_size 0x%08x, used_size 0x%08x\n",
 254                               jeb->offset, jeb->free_size, jeb->dirty_size, jeb->used_size);
 255                        jeb->gc_node = raw;
 256                        spin_unlock(&c->erase_completion_lock);
 257                        mutex_unlock(&c->alloc_sem);
 258                        BUG();
 259                }
 260        }
 261        jeb->gc_node = raw;
 262
 263        D1(printk(KERN_DEBUG "Going to garbage collect node at 0x%08x\n", ref_offset(raw)));
 264
 265        if (!raw->next_in_ino) {
 266                /* Inode-less node. Clean marker, snapshot or something like that */
 267                spin_unlock(&c->erase_completion_lock);
Show full sources