Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263804
b: refs/heads/master
c: 848e7d5
h: refs/heads/master
v: v3
  • Loading branch information
Robert Love authored and James Bottomley committed Aug 29, 2011
1 parent 68f9975 commit 65a457b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 7ca3c803e85080afdff4097e60fefec865027809
refs/heads/master: 848e7d5b46b9b0ee613a106bc460acf6a09a8546
13 changes: 8 additions & 5 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
u8 flogi_maddr[ETH_ALEN];
const struct net_device_ops *ops;

rtnl_lock();

/*
* Don't listen for Ethernet packets anymore.
* synchronize_net() ensures that the packet handlers are not running
Expand Down Expand Up @@ -461,6 +463,8 @@ void fcoe_interface_cleanup(struct fcoe_interface *fcoe)
" specific feature for LLD.\n");
}

rtnl_unlock();

/* Release the self-reference taken during fcoe_interface_create() */
fcoe_interface_put(fcoe);
}
Expand Down Expand Up @@ -1951,11 +1955,8 @@ static void fcoe_destroy_work(struct work_struct *work)
fcoe_if_destroy(port->lport);

/* Do not tear down the fcoe interface for NPIV port */
if (!npiv) {
rtnl_lock();
if (!npiv)
fcoe_interface_cleanup(fcoe);
rtnl_unlock();
}

mutex_unlock(&fcoe_config_mutex);
}
Expand Down Expand Up @@ -2009,8 +2010,9 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode)
printk(KERN_ERR "fcoe: Failed to create interface (%s)\n",
netdev->name);
rc = -EIO;
rtnl_unlock();
fcoe_interface_cleanup(fcoe);
goto out_nodev;
goto out_nortnl;
}

/* Make this the "master" N_Port */
Expand All @@ -2027,6 +2029,7 @@ static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode)

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

0 comments on commit 65a457b

Please sign in to comment.