aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-05-17 12:16:03 -0400
committerRoland Dreier <rolandd@cisco.com>2006-05-17 12:16:03 -0400
commitec2d7208494fe599a5ff13b40a0a20c9881f2737 (patch)
tree32af58729f73b18d08fa8759a3408cb4058c6455
parente65810566f3e613d9baa5512b8724ebde42ace0f (diff)
IB/srp: Get rid of extra scsi_host_put()s if reconnection fails
If a reconnection attempt fails, then SRP does two scsi_host_put()s. This is a historical relic from an earlier version of the driver that took a reference on the scsi_host before trying to reconnect, so get rid of the extra scsi_host_put(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 351d66f3250d..0f24f04cb60e 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -354,7 +354,6 @@ static void srp_remove_work(void *target_ptr)
354 spin_lock_irq(target->scsi_host->host_lock); 354 spin_lock_irq(target->scsi_host->host_lock);
355 if (target->state != SRP_TARGET_DEAD) { 355 if (target->state != SRP_TARGET_DEAD) {
356 spin_unlock_irq(target->scsi_host->host_lock); 356 spin_unlock_irq(target->scsi_host->host_lock);
357 scsi_host_put(target->scsi_host);
358 return; 357 return;
359 } 358 }
360 target->state = SRP_TARGET_REMOVED; 359 target->state = SRP_TARGET_REMOVED;
@@ -368,8 +367,6 @@ static void srp_remove_work(void *target_ptr)
368 ib_destroy_cm_id(target->cm_id); 367 ib_destroy_cm_id(target->cm_id);
369 srp_free_target_ib(target); 368 srp_free_target_ib(target);
370 scsi_host_put(target->scsi_host); 369 scsi_host_put(target->scsi_host);
371 /* And another put to really free the target port... */
372 scsi_host_put(target->scsi_host);
373} 370}
374 371
375static int srp_connect_target(struct srp_target_port *target) 372static int srp_connect_target(struct srp_target_port *target)