On 30/09/20 16:27, Maxim Levitsky wrote:
> My patch that switches the direction in scsi_device_find, is supposed to be 
> completely equavalent, 
> based on the following train of thought:
> 
> If scsi_device_find finds an exact match it returns only it, as before.
> 
> Otherwise scsi_device_find were to scan from end of the list to the start, 
> and every time,
> it finds a device with same channel/id it would update the target_dev
> and return it when it reaches the end of the list. 
> 
> If I am not mistaken this means that it would return _first_ device in the 
> list that matches the channel/id.
> This is exactly what new version of scsi_device_find does.

Oh!  I missed that subtlety.  Thanks, that makes sense.

Paolo


Reply via email to