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/scsi/scsi_lib.c |
Line in file: | 1727 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
1697 blk_plug_device(q); 1698 1699 break; 1700 } 1701 } 1702 1703 goto out; 1704 1705 not_ready: 1706 spin_unlock_irq(shost->host_lock); 1707 1708 /* 1709 * lock q, handle tag, requeue req, and decrement device_busy. We 1710 * must return with queue_lock held. 1711 * 1712 * Decrementing device_busy without checking it is OK, as all such 1713 * cases (host limits or settings) should run the queue at some 1714 * later time. 1715 */ 1716 spin_lock_irq(q->queue_lock); 1717 blk_requeue_request(q, req); 1718 sdev->device_busy--; 1719 if(sdev->device_busy == 0) 1720 blk_plug_device(q); 1721 out: 1722 /* must be careful here...if we trigger the ->remove() function 1723 * we cannot be holding the q lock */ 1724 spin_unlock_irq(q->queue_lock); 1725 put_device(&sdev->sdev_gendev); 1726 spin_lock_irq(q->queue_lock); 1727} 1728 1729u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost) 1730{ 1731 struct device *host_dev; 1732 u64 bounce_limit = 0xffffffff; 1733 1734 if (shost->unchecked_isa_dma) 1735 return BLK_BOUNCE_ISA; 1736 /* 1737 * Platforms with virtual-DMA translation