Showing error 1589

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/dev.c
Line in file: 764
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

 734                              unsigned long nr_segs, loff_t pos)
 735{
 736        int err;
 737        struct fuse_req *req;
 738        struct fuse_in *in;
 739        struct fuse_copy_state cs;
 740        unsigned reqsize;
 741        struct file *file = iocb->ki_filp;
 742        struct fuse_conn *fc = fuse_get_conn(file);
 743        if (!fc)
 744                return -EPERM;
 745
 746 restart:
 747        spin_lock(&fc->lock);
 748        err = -EAGAIN;
 749        if ((file->f_flags & O_NONBLOCK) && fc->connected &&
 750            !request_pending(fc))
 751                goto err_unlock;
 752
 753        request_wait(fc);
 754        err = -ENODEV;
 755        if (!fc->connected)
 756                goto err_unlock;
 757        err = -ERESTARTSYS;
 758        if (!request_pending(fc))
 759                goto err_unlock;
 760
 761        if (!list_empty(&fc->interrupts)) {
 762                req = list_entry(fc->interrupts.next, struct fuse_req,
 763                                 intr_entry);
 764                return fuse_read_interrupt(fc, req, iov, nr_segs);
 765        }
 766
 767        req = list_entry(fc->pending.next, struct fuse_req, list);
 768        req->state = FUSE_REQ_READING;
 769        list_move(&req->list, &fc->io);
 770
 771        in = &req->in;
 772        reqsize = in->h.len;
 773        /* If request is too large, reply with an error and restart the read */
 774        if (iov_length(iov, nr_segs) < reqsize) {
Show full sources