Hello, Bart.

On Wed, Nov 28, 2012 at 01:48:24PM +0100, Bart Van Assche wrote:
> @@ -452,11 +452,13 @@ static void scsi_run_queue(struct request_queue *q)
>                       continue;
>               }
>  
> -             spin_unlock(shost->host_lock);
> -             spin_lock(sdev->request_queue->queue_lock);
> -             __blk_run_queue(sdev->request_queue);
> -             spin_unlock(sdev->request_queue->queue_lock);
> -             spin_lock(shost->host_lock);
> +             get_device(&sdev->sdev_gendev);
> +             spin_unlock_irqrestore(shost->host_lock, flags);
> +
> +             blk_run_queue(sdev->request_queue);
> +             put_device(&sdev->sdev_gendev);
> +
> +             spin_lock_irqsave(shost->host_lock, flags);

Some comment wouldn't hurt here.

> @@ -977,6 +978,10 @@ void __scsi_remove_device(struct scsi_device *sdev)
>       blk_cleanup_queue(sdev->request_queue);
>       cancel_work_sync(&sdev->requeue_work);
>  
> +     spin_lock_irqsave(shost->host_lock, flags);
> +     list_del(&sdev->starved_entry);
> +     spin_unlock_irqrestore(shost->host_lock, flags);
> +

And please add a comment explaining what's going on around
->starved_entry.  It's rather different from anything else.

Thanks!

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to