The scanning of scsi_dh_list for handler could stop when the first handler is found, since the second, if exist, could not be better. Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx> --- --- a/drivers/scsi/device_handler/scsi_dh.c 2010-11-01 19:54:12.000000000 +0800 +++ b/drivers/scsi/device_handler/scsi_dh.c 2010-11-16 20:52:24.000000000 +0800 @@ -116,8 +116,10 @@ device_handler_match(struct scsi_device_ spin_lock(&list_lock); list_for_each_entry(tmp_dh, &scsi_dh_list, list) { - if (scsi_dh_handler_lookup(tmp_dh, sdev)) + if (scsi_dh_handler_lookup(tmp_dh, sdev)) { found_dh = tmp_dh; + break; + } } spin_unlock(&list_lock); } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html