aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2010-05-07 18:19:03 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-16 22:22:40 -0400
commit15af974dcb22914f29aeb9a9cac5879b0dc3860e (patch)
treeffec602e4414afdf0486f475b79087ac3240928d /drivers/scsi/fcoe
parentfb83153d7308e1344f1d4a2e287b6aaab2f6d14c (diff)
[SCSI] fcoe: fix fcoe module ref counting
Currently fcoe module ref count is used for tracking active fcoe instances, it means each fcoe instance create increments the count while destroy dec the count. The dec is done only if fcoe instance is destroyed from /sysfs but not if destroyed due to NETDEV_UNREGISTER event. So this patch moves only module_put doing dec to common fcoe_if_destroy function, so that dec would occur on ever fcoe instance destroy. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 0c825c0944f7..ba75a98c960c 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -851,6 +851,7 @@ static void fcoe_if_destroy(struct fc_lport *lport)
851 851
852 /* Release the Scsi_Host */ 852 /* Release the Scsi_Host */
853 scsi_host_put(lport->host); 853 scsi_host_put(lport->host);
854 module_put(THIS_MODULE);
854} 855}
855 856
856/** 857/**
@@ -2034,7 +2035,6 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp)
2034 fcoe_interface_cleanup(fcoe); 2035 fcoe_interface_cleanup(fcoe);
2035 /* RTNL mutex is dropped by fcoe_if_destroy */ 2036 /* RTNL mutex is dropped by fcoe_if_destroy */
2036 fcoe_if_destroy(fcoe->ctlr.lp); 2037 fcoe_if_destroy(fcoe->ctlr.lp);
2037 module_put(THIS_MODULE);
2038 2038
2039out_putdev: 2039out_putdev:
2040 dev_put(netdev); 2040 dev_put(netdev);