Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270952
b: refs/heads/master
c: cdf5466
h: refs/heads/master
v: v3
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Aug 27, 2011
1 parent 71dca33 commit 21c99d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b65d457913d1c0644394287d5d834373f42fb99a
refs/heads/master: cdf54668bc48193e43adc8f75ce419ce0ce50fc0
12 changes: 12 additions & 0 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,20 @@ static int bnx2fc_vport_destroy(struct fc_vport *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);
struct fc_lport *v_port;
bool found = false;

mutex_lock(&n_port->lp_mutex);
list_for_each_entry(v_port, &n_port->vports, list)
if (v_port->vport == vport) {
found = true;
break;
}

if (!found) {
mutex_unlock(&n_port->lp_mutex);
return -ENOENT;
}
list_del(&vn_port->list);
mutex_unlock(&n_port->lp_mutex);
queue_work(bnx2fc_wq, &port->destroy_work);
Expand Down

0 comments on commit 21c99d2

Please sign in to comment.