Showing error 932

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/fuse/file.c
Line in file: 1455
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 5291658d87ac1ae60418e79e7b6bad7d5f595e0c
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

1425        memset(&inarg, 0, sizeof(inarg));
1426        inarg.block = block;
1427        inarg.blocksize = inode->i_sb->s_blocksize;
1428        req->in.h.opcode = FUSE_BMAP;
1429        req->in.h.nodeid = get_node_id(inode);
1430        req->in.numargs = 1;
1431        req->in.args[0].size = sizeof(inarg);
1432        req->in.args[0].value = &inarg;
1433        req->out.numargs = 1;
1434        req->out.args[0].size = sizeof(outarg);
1435        req->out.args[0].value = &outarg;
1436        request_send(fc, req);
1437        err = req->out.h.error;
1438        fuse_put_request(fc, req);
1439        if (err == -ENOSYS)
1440                fc->no_bmap = 1;
1441
1442        return err ? 0 : outarg.block;
1443}
1444
1445static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin)
1446{
1447        loff_t retval;
1448        struct inode *inode = file->f_path.dentry->d_inode;
1449
1450        mutex_lock(&inode->i_mutex);
1451        switch (origin) {
1452        case SEEK_END:
1453                retval = fuse_update_attributes(inode, NULL, file, NULL);
1454                if (retval)
1455                        return retval;
1456                offset += i_size_read(inode);
1457                break;
1458        case SEEK_CUR:
1459                offset += file->f_pos;
1460        }
1461        retval = -EINVAL;
1462        if (offset >= 0 && offset <= inode->i_sb->s_maxbytes) {
1463                if (offset != file->f_pos) {
1464                        file->f_pos = offset;
1465                        file->f_version = 0;
Show full sources