summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2010-02-16 12:15:39 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-02-17 17:43:45 -0600
commite9ee2cf438066aa02df98db959733e1547432983 (patch)
treee0b2cb3e34fcc01e9be9d5e2d4ec2b8686922222 /Makefile
parent03bf7a5af58e07aa13ea61993f5892f733b6f46d (diff)
downloadlinux-3.10-e9ee2cf438066aa02df98db959733e1547432983.tar.gz
linux-3.10-e9ee2cf438066aa02df98db959733e1547432983.tar.bz2
linux-3.10-e9ee2cf438066aa02df98db959733e1547432983.zip
[SCSI] fcoe: Only rmmod fcoe.ko if there are no active connections
Currently we're gracefully tearing down each active connection when fcoe.ko is removed. We shouldn't allow the user to destroy connections by removing the module. We should force the user to destroy each connection and then the module can be removed. This patch makes it so a refrerence count on the module is taken each time a fcoe_interface is created. The reference count is dropped when the fcoe_interface is destroyed. This makes it so that module_exit() doesn't get called unless all fcoe_interfaces have been destroyed. This patch leaves the removal of interfaces in the module_exit routine so that if the user does a 'rmmod -f' we'll clean everything up before removing the module. The module_put line was put before the out_putdev goto line because we should only be decrementing the reference count if a fcoe_interface is actually destroyed. If we can't find the netdev or the fcoe_interface then it's assumed that something else has destroyed the fcoe_interface and it would have decremented the reference count at that time. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions