Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195554
b: refs/heads/master
c: 2f2ac4a
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Apr 11, 2010
1 parent 559797a commit de6b413
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 4dc7ccf7e9d9bca1989b840be9e8e84911387cf2
refs/heads/master: 2f2ac4a0df8c4beee6e4057a69fa973b6040a573
11 changes: 9 additions & 2 deletions trunk/drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ static void fc_lport_ptp_setup(struct fc_lport *lport,
u64 remote_wwnn)
{
mutex_lock(&lport->disc.disc_mutex);
if (lport->ptp_rdata)
if (lport->ptp_rdata) {
lport->tt.rport_logoff(lport->ptp_rdata);
kref_put(&lport->ptp_rdata->kref, lport->tt.rport_destroy);
}
lport->ptp_rdata = lport->tt.rport_create(lport, remote_fid);
kref_get(&lport->ptp_rdata->kref);
lport->ptp_rdata->ids.port_name = remote_wwpn;
lport->ptp_rdata->ids.node_name = remote_wwnn;
mutex_unlock(&lport->disc.disc_mutex);
Expand Down Expand Up @@ -947,7 +950,11 @@ static void fc_lport_reset_locked(struct fc_lport *lport)
if (lport->dns_rdata)
lport->tt.rport_logoff(lport->dns_rdata);

lport->ptp_rdata = NULL;
if (lport->ptp_rdata) {
lport->tt.rport_logoff(lport->ptp_rdata);
kref_put(&lport->ptp_rdata->kref, lport->tt.rport_destroy);
lport->ptp_rdata = NULL;
}

lport->tt.disc_stop(lport);

Expand Down

0 comments on commit de6b413

Please sign in to comment.