scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
This patch allows to pass in a NULL hardware handler to
scsi_dh_attach(), causing the reference count of the existing
hardware handler to be increased.
An error will be returned if no hardware handler is attached.
- scsi_dh = get_device_handler(name);
+ if (name) {
+ scsi_dh = get_device_handler(name);
+ } else if (sdev->scsi_dh_data) {
+ scsi_dh = sdev->scsi_dh_data->scsi_dh;
+ }
if (!scsi_dh)
return -EINVAL;
--
1.7.7
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
05-08-2012, 02:18 PM
Hannes Reinecke
scsi_dh: Allow NULL hardware handler name in scsi_dh_attach()
This patch allows to pass in a NULL hardware handler to
scsi_dh_attach(), causing the reference count of the existing
hardware handler to be increased.
An error will be returned if no hardware handler is attached.