]> err.no Git - linux-2.6/commitdiff
IB/srp: Get rid of extra scsi_host_put()s if reconnection fails
authorRoland Dreier <rolandd@cisco.com>
Wed, 17 May 2006 16:16:03 +0000 (09:16 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 17 May 2006 16:16:03 +0000 (09:16 -0700)
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>
drivers/infiniband/ulp/srp/ib_srp.c

index 351d66f3250d6936a3783c6130a7458477607184..0f24f04cb60e3d98393a70c32b4076e1e2b96a0f 100644 (file)
@@ -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;
@@ -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)