Showing error 948

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/readinode.c
Line in file: 1395
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

1365                f->inocache->state = INO_STATE_READING;
1366                jffs2_add_ino_cache(c, f->inocache);
1367        }
1368        if (!f->inocache) {
1369                JFFS2_ERROR("requestied to read an nonexistent ino %u\n", ino);
1370                return -ENOENT;
1371        }
1372
1373        return jffs2_do_read_inode_internal(c, f, latest_node);
1374}
1375
1376int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic)
1377{
1378        struct jffs2_raw_inode n;
1379        struct jffs2_inode_info *f = kzalloc(sizeof(*f), GFP_KERNEL);
1380        int ret;
1381
1382        if (!f)
1383                return -ENOMEM;
1384
1385        mutex_init(&f->sem);
1386        mutex_lock(&f->sem);
1387        f->inocache = ic;
1388
1389        ret = jffs2_do_read_inode_internal(c, f, &n);
1390        if (!ret) {
1391                mutex_unlock(&f->sem);
1392                jffs2_do_clear_inode(c, f);
1393        }
1394        kfree (f);
1395        return ret;
1396}
1397
1398void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
1399{
1400        struct jffs2_full_dirent *fd, *fds;
1401        int deleted;
1402
1403        jffs2_clear_acl(f);
1404        jffs2_xattr_delete_inode(c, f->inocache);
1405        mutex_lock(&f->sem);
Show full sources