[PATCH 5/6] scsi_dh : release the refcounts in scsi_dh_hp_sw handler when activate is complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch releases the refcounts when activate is complete in scsi_dh_hp_sw handler.

Signed-off-by: Babu Moger <babu.moger@xxxxxxx>
---
--- linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_hp_sw.c.orig	2010-07-23 06:02:22.000000000 -0500
+++ linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_hp_sw.c	2010-07-23 06:03:17.000000000 -0500
@@ -230,6 +230,9 @@ done:
 		h->callback_fn(h->callback_data, err);
 		h->callback_fn = h->callback_data = NULL;
 	}
+	kref_put(&h->sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup);
+	put_device(&h->sdev->sdev_gendev);
+
 	return;
 
 }
@@ -307,6 +310,9 @@ static int hp_sw_activate(struct scsi_de
 
 	if (fn)
 		fn(data, ret);
+	kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup);
+	put_device(&sdev->sdev_gendev);
+
 	return 0;
 }
 


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux