Showing error 1137

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


Source:

 551
 552        jffs2_dbg_acct_sanity_check_nolock(c, new_jeb);
 553        jffs2_dbg_acct_paranoia_check_nolock(c, new_jeb);
 554
 555        spin_unlock(&c->erase_completion_lock);
 556
 557        D1(printk(KERN_DEBUG "wbuf recovery completed OK. wbuf_ofs 0x%08x, len 0x%x\n", c->wbuf_ofs, c->wbuf_len));
 558
 559}
 560
 561/* Meaning of pad argument:
 562   0: Do not pad. Probably pointless - we only ever use this when we can't pad anyway.
 563   1: Pad, do not adjust nextblock free_size
 564   2: Pad, adjust nextblock free_size
 565*/
 566#define NOPAD                0
 567#define PAD_NOACCOUNT        1
 568#define PAD_ACCOUNTING        2
 569
 570static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad)
 571{
 572        struct jffs2_eraseblock *wbuf_jeb;
 573        int ret;
 574        size_t retlen;
 575
 576        /* Nothing to do if not write-buffering the flash. In particular, we shouldn't
 577           del_timer() the timer we never initialised. */
 578        if (!jffs2_is_writebuffered(c))
 579                return 0;
 580
 581        if (mutex_trylock(&c->alloc_sem)) {
 582                mutex_unlock(&c->alloc_sem);
 583                printk(KERN_CRIT "jffs2_flush_wbuf() called with alloc_sem not locked!\n");
 584                BUG();
 585        }
 586
 587        if (!c->wbuf_len)        /* already checked c->wbuf above */
 588                return 0;
 589
 590        wbuf_jeb = &c->blocks[c->wbuf_ofs / c->sector_size];
 591        if (jffs2_prealloc_raw_node_refs(c, wbuf_jeb, c->nextblock->allocated_refs + 1))
Show full sources