Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362078
b: refs/heads/master
c: f9c4358
h: refs/heads/master
v: v3
  • Loading branch information
Robert Love committed Mar 25, 2013
1 parent fb96d35 commit 5ccc1ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01bdcb626f80838f55ec2af993daef50b9c59c49
refs/heads/master: f9c4358edb285cead00a0d6cf0644c84ee773026
15 changes: 11 additions & 4 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ static void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
{
struct net_device *netdev = fcoe->netdev;
struct fcoe_ctlr *fip = fcoe_to_ctlr(fcoe);
struct fcoe_ctlr_device *ctlr_dev = fcoe_ctlr_to_ctlr_dev(fip);

rtnl_lock();
if (!fcoe->removed)
Expand All @@ -501,7 +500,6 @@ static void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
/* tear-down the FCoE controller */
fcoe_ctlr_destroy(fip);
scsi_host_put(fip->lp->host);
fcoe_ctlr_device_delete(ctlr_dev);
dev_put(netdev);
module_put(THIS_MODULE);
}
Expand Down Expand Up @@ -2194,6 +2192,8 @@ static int fcoe_destroy(struct net_device *netdev)
*/
static void fcoe_destroy_work(struct work_struct *work)
{
struct fcoe_ctlr_device *cdev;
struct fcoe_ctlr *ctlr;
struct fcoe_port *port;
struct fcoe_interface *fcoe;
struct Scsi_Host *shost;
Expand Down Expand Up @@ -2224,10 +2224,15 @@ static void fcoe_destroy_work(struct work_struct *work)
mutex_lock(&fcoe_config_mutex);

fcoe = port->priv;
ctlr = fcoe_to_ctlr(fcoe);
cdev = fcoe_ctlr_to_ctlr_dev(ctlr);

fcoe_if_destroy(port->lport);
fcoe_interface_cleanup(fcoe);

mutex_unlock(&fcoe_config_mutex);

fcoe_ctlr_device_delete(cdev);
}

/**
Expand Down Expand Up @@ -2335,7 +2340,9 @@ static int _fcoe_create(struct net_device *netdev, enum fip_state fip_mode,
rc = -EIO;
rtnl_unlock();
fcoe_interface_cleanup(fcoe);
goto out_nortnl;
mutex_unlock(&fcoe_config_mutex);
fcoe_ctlr_device_delete(ctlr_dev);
goto out;
}

/* Make this the "master" N_Port */
Expand Down Expand Up @@ -2375,8 +2382,8 @@ static int _fcoe_create(struct net_device *netdev, enum fip_state fip_mode,

out_nodev:
rtnl_unlock();
out_nortnl:
mutex_unlock(&fcoe_config_mutex);
out:
return rc;
}

Expand Down

0 comments on commit 5ccc1ee

Please sign in to comment.