Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292956
b: refs/heads/master
c: ccefd23
h: refs/heads/master
v: v3
  • Loading branch information
Robert Love authored and James Bottomley committed Feb 19, 2012
1 parent ed31fde commit 694f8d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: 6f68794c9283bbce3f7c91d3be34cb4f4f6ed960
refs/heads/master: ccefd23ed2d683ad3c0282280e6e6d0b163ad041
15 changes: 6 additions & 9 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2107,20 +2107,14 @@ static void fcoe_destroy_work(struct work_struct *work)
{
struct fcoe_port *port;
struct fcoe_interface *fcoe;
int npiv = 0;

port = container_of(work, struct fcoe_port, destroy_work);
mutex_lock(&fcoe_config_mutex);

/* set if this is an NPIV port */
npiv = port->lport->vport ? 1 : 0;

fcoe = port->priv;
fcoe_if_destroy(port->lport);

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

mutex_unlock(&fcoe_config_mutex);
}
Expand Down Expand Up @@ -2691,12 +2685,15 @@ static int fcoe_vport_destroy(struct fc_vport *vport)
struct Scsi_Host *shost = vport_to_shost(vport);
struct fc_lport *n_port = shost_priv(shost);
struct fc_lport *vn_port = vport->dd_data;
struct fcoe_port *port = lport_priv(vn_port);

mutex_lock(&n_port->lp_mutex);
list_del(&vn_port->list);
mutex_unlock(&n_port->lp_mutex);
queue_work(fcoe_wq, &port->destroy_work);

mutex_lock(&fcoe_config_mutex);
fcoe_if_destroy(vn_port);
mutex_unlock(&fcoe_config_mutex);

return 0;
}

Expand Down

0 comments on commit 694f8d3

Please sign in to comment.