Skip to content

Commit

Permalink
IB/srp: Get rid of extra scsi_host_put()s if reconnection fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier committed May 17, 2006
1 parent e658105 commit ec2d720
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ static void srp_remove_work(void *target_ptr)
spin_lock_irq(target->scsi_host->host_lock);
if (target->state != SRP_TARGET_DEAD) {
spin_unlock_irq(target->scsi_host->host_lock);
scsi_host_put(target->scsi_host);
return;
}
target->state = SRP_TARGET_REMOVED;
Expand All @@ -368,8 +367,6 @@ static void srp_remove_work(void *target_ptr)
ib_destroy_cm_id(target->cm_id);
srp_free_target_ib(target);
scsi_host_put(target->scsi_host);
/* And another put to really free the target port... */
scsi_host_put(target->scsi_host);
}

static int srp_connect_target(struct srp_target_port *target)
Expand Down

0 comments on commit ec2d720

Please sign in to comment.