Re: [PATCH] scsi-misc-2.5 remove scsi_device list_lock

Luben Tuikov
2003-04-25T13:48:06Z

Christoph Hellwig wrote:
>>- spin_lock_irqsave(&d->list_lock, flags);
>>+ spin_lock_irqsave(&d->sdev_lock, flags);
>> list_for_each_entry(cmd, &d->cmd_list, list) {
>> if(cmd->serial_number == 0){
>
>
> <snip>
>
>>- spin_lock_irqsave(&sdev->list_lock, flags);
>>+ spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
>> list_for_each_entry(scmd, &sdev->cmd_list, list) {
>
>
>
> Oh, please, please use the lock consistantly. Yes, I know that the
> two are the same currently, but it might not be obvious to every reader
> and queue_lock might change to something else in the future.

I concur.

--
Luben

P.S. This same thing was discussed before at the intro of starved
devs's code, seems it didn't get through then, maybe it will now...