From: Matthew Wilcox Date: Wed, 22 Nov 2006 20:24:53 +0000 (-0700) Subject: [SCSI] fix missing check for no scanning X-Git-Tag: v2.6.20-rc1~34^2~20^2~41^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93b45af5c6b9d41bbe9da11442291ac4eefc15b4;p=linux-2.6 [SCSI] fix missing check for no scanning Drivers that called scsi_scan_target() instead of scsi_scan_host() were still adding devices; this needs to be under the control of userspace, not the driver. Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index d91d268dd3..3ccaa4be92 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1549,6 +1549,9 @@ void scsi_scan_target(struct device *parent, unsigned int channel, { struct Scsi_Host *shost = dev_to_shost(parent); + if (strncmp(scsi_scan_type, "none", 4) == 0) + return; + if (!shost->async_scan) scsi_complete_async_scans();