Showing error 1082

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: drivers/block/nbd.c
Line in file: 558
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

528 * if ((rq_data_dir(req) == WRITE) && (lo->flags & NBD_WRITE_NOCHK))
529 *   { printk( "Warning: Ignoring result!\n"); nbd_end_request( req ); }
530 */
531
532static void do_nbd_request(struct request_queue * q)
533{
534        struct request *req;
535        
536        while ((req = elv_next_request(q)) != NULL) {
537                struct nbd_device *lo;
538
539                blkdev_dequeue_request(req);
540
541                spin_unlock_irq(q->queue_lock);
542
543                dprintk(DBG_BLKDEV, "%s: request %p: dequeued (flags=%x)\n",
544                                req->rq_disk->disk_name, req, req->cmd_type);
545
546                lo = req->rq_disk->private_data;
547
548                BUG_ON(lo->magic != LO_MAGIC);
549
550                spin_lock_irq(&lo->queue_lock);
551                list_add_tail(&req->queuelist, &lo->waiting_queue);
552                spin_unlock_irq(&lo->queue_lock);
553
554                wake_up(&lo->waiting_wq);
555
556                spin_lock_irq(q->queue_lock);
557        }
558}
559
560static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
561                     unsigned int cmd, unsigned long arg)
562{
563        struct nbd_device *lo = bdev->bd_disk->private_data;
564        struct file *file;
565        int error;
566        struct request sreq ;
567        struct task_struct *thread;
568
Show full sources