scsi: libfc: Replace ->rport_destroy callback with function call

The ->rport_destroy callback only ever had one implementation,
so we can as well call it directly and drop the callback.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Hannes Reinecke
2016-10-18 10:01:39 +02:00
committed by Martin K. Petersen
parent 3afd2d1521
commit 944ef9689d
5 changed files with 43 additions and 56 deletions

View File

@@ -247,7 +247,7 @@ static void fc_lport_ptp_setup(struct fc_lport *lport,
{
if (lport->ptp_rdata) {
lport->tt.rport_logoff(lport->ptp_rdata);
kref_put(&lport->ptp_rdata->kref, lport->tt.rport_destroy);
kref_put(&lport->ptp_rdata->kref, fc_rport_destroy);
}
mutex_lock(&lport->disc.disc_mutex);
lport->ptp_rdata = lport->tt.rport_create(lport, remote_fid);
@@ -1017,7 +1017,7 @@ static void fc_lport_reset_locked(struct fc_lport *lport)
if (lport->ptp_rdata) {
lport->tt.rport_logoff(lport->ptp_rdata);
kref_put(&lport->ptp_rdata->kref, lport->tt.rport_destroy);
kref_put(&lport->ptp_rdata->kref, fc_rport_destroy);
lport->ptp_rdata = NULL;
}
@@ -2129,7 +2129,7 @@ int fc_lport_bsg_request(struct fc_bsg_job *job)
if (!rdata)
break;
tov = rdata->e_d_tov;
kref_put(&rdata->kref, lport->tt.rport_destroy);
kref_put(&rdata->kref, fc_rport_destroy);
}
rc = fc_lport_ct_request(job, lport, did, tov);