aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorMike Anderson <andmike@us.ibm.com>2005-06-16 14:14:33 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-30 12:13:01 -0400
commit82f29467a025f6a2192d281e97fca0be46e905cc (patch)
tree5cf356ece53caf2936ca85803676b326094f7c38 /drivers/scsi/hosts.c
parentd2c9d9eafa03dbd08a8a439e6c5addb8b1f03b9b (diff)
[SCSI] host state model update: mediate host add/remove race
Add support to not allow additions to a host when it is being removed. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 67c4c0c3aa5e..8640ad1c17e2 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -133,7 +133,9 @@ EXPORT_SYMBOL(scsi_host_set_state);
133 **/ 133 **/
134void scsi_remove_host(struct Scsi_Host *shost) 134void scsi_remove_host(struct Scsi_Host *shost)
135{ 135{
136 down(&shost->scan_mutex);
136 scsi_host_set_state(shost, SHOST_CANCEL); 137 scsi_host_set_state(shost, SHOST_CANCEL);
138 up(&shost->scan_mutex);
137 scsi_forget_host(shost); 139 scsi_forget_host(shost);
138 scsi_proc_host_rm(shost); 140 scsi_proc_host_rm(shost);
139 141