Showing error 1715

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/jffs2/nodemgmt.c
Line in file: 726
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 19:10:05 UTC


Source:

696                struct jffs2_inode_cache *ic;
697                struct jffs2_raw_node_ref **p;
698
699                spin_lock(&c->erase_completion_lock);
700
701                ic = jffs2_raw_ref_to_ic(ref);
702                for (p = &ic->nodes; (*p) != ref; p = &((*p)->next_in_ino))
703                        ;
704
705                *p = ref->next_in_ino;
706                ref->next_in_ino = NULL;
707
708                switch (ic->class) {
709#ifdef CONFIG_JFFS2_FS_XATTR
710                        case RAWNODE_CLASS_XATTR_DATUM:
711                                jffs2_release_xattr_datum(c, (struct jffs2_xattr_datum *)ic);
712                                break;
713                        case RAWNODE_CLASS_XATTR_REF:
714                                jffs2_release_xattr_ref(c, (struct jffs2_xattr_ref *)ic);
715                                break;
716#endif
717                        default:
718                                if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
719                                        jffs2_del_ino_cache(c, ic);
720                                break;
721                }
722                spin_unlock(&c->erase_completion_lock);
723        }
724
725 out_erase_sem:
726        mutex_unlock(&c->erase_free_sem);
727}
728
729int jffs2_thread_should_wake(struct jffs2_sb_info *c)
730{
731        int ret = 0;
732        uint32_t dirty;
733        int nr_very_dirty = 0;
734        struct jffs2_eraseblock *jeb;
735
736        if (c->unchecked_size) {
Show full sources