Showing error 975

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: 144
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

114                                  c->nr_free_blocks, c->nr_erasing_blocks, c->free_size, c->dirty_size, c->wasted_size, c->used_size, c->erasing_size, c->bad_size,
115                                  c->free_size + c->dirty_size + c->wasted_size + c->used_size + c->erasing_size + c->bad_size, c->flash_size));
116                        spin_unlock(&c->erase_completion_lock);
117
118                        ret = jffs2_garbage_collect_pass(c);
119
120                        if (ret == -EAGAIN)
121                                jffs2_erase_pending_blocks(c, 1);
122                        else if (ret)
123                                return ret;
124
125                        cond_resched();
126
127                        if (signal_pending(current))
128                                return -EINTR;
129
130                        mutex_lock(&c->alloc_sem);
131                        spin_lock(&c->erase_completion_lock);
132                }
133
134                ret = jffs2_do_reserve_space(c, minsize, len, sumsize);
135                if (ret) {
136                        D1(printk(KERN_DEBUG "jffs2_reserve_space: ret is %d\n", ret));
137                }
138        }
139        spin_unlock(&c->erase_completion_lock);
140        if (!ret)
141                ret = jffs2_prealloc_raw_node_refs(c, c->nextblock, 1);
142        if (ret)
143                mutex_unlock(&c->alloc_sem);
144        return ret;
145}
146
147int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize,
148                           uint32_t *len, uint32_t sumsize)
149{
150        int ret = -EAGAIN;
151        minsize = PAD(minsize);
152
153        D1(printk(KERN_DEBUG "jffs2_reserve_space_gc(): Requested 0x%x bytes\n", minsize));
154
Show full sources