On Sun, Feb 06, 2005 at 08:41:23PM +0100, Andi Kleen wrote: > This patch fixes one of Christroph's fixme comments in the SCSI midlayer.
If we're going to start fixing problems that Christoph noted, this one seems obvious to me: The static device_request_lock doesn't protect anything; remove it. Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]> --- linux-2.6/drivers/scsi/scsi.c 2005-01-23 21:46:55.000000000 -0500 +++ scsi-2.6/drivers/scsi/scsi.c 2005-02-06 14:57:07.000000000 -0500 @@ -920,12 +920,9 @@ EXPORT_SYMBOL(scsi_finish_command); * the right thing depending on whether or not the device is * currently active and whether or not it even has the * command blocks built yet. - * - * XXX(hch): What exactly is device_request_lock trying to protect? */ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags) { - static DEFINE_SPINLOCK(device_request_lock); unsigned long flags; /* @@ -934,8 +931,7 @@ void scsi_adjust_queue_depth(struct scsi if (tags <= 0) return; - spin_lock_irqsave(&device_request_lock, flags); - spin_lock(sdev->request_queue->queue_lock); + spin_lock_irqsave(sdev->request_queue->queue_lock, flags); /* Check to see if the queue is managed by the block layer * if it is, and we fail to adjust the depth, exit */ @@ -964,8 +960,7 @@ void scsi_adjust_queue_depth(struct scsi break; } out: - spin_unlock(sdev->request_queue->queue_lock); - spin_unlock_irqrestore(&device_request_lock, flags); + spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); } EXPORT_SYMBOL(scsi_adjust_queue_depth); -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html