diff options
author | Yi Zou <yi.zou@intel.com> | 2010-11-30 19:19:35 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:24:27 -0500 |
commit | b5fe5e953c65cd0ec4e9ffd001072700e5b89317 (patch) | |
tree | 07fb2fcd313e43663de51b354ef7b0f259d71048 /drivers/scsi/libfc/fc_fcp.c | |
parent | 3a91090fe0df10091c5612db8528ee7a822ab83d (diff) |
[SCSI] libfc: fix fc_tm_done not freeing the allocated fsp pkt
Frame should be freed in fc_tm_done, this is an updated patch on the one
initially submitted by Hillf Danton.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc/fc_fcp.c')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 338620b33fa1..a8e0c0acc736 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -1321,27 +1321,27 @@ static void fc_tm_done(struct fc_seq *seq, struct fc_frame *fp, void *arg) | |||
1321 | * | 1321 | * |
1322 | * scsi-eh will escalate for when either happens. | 1322 | * scsi-eh will escalate for when either happens. |
1323 | */ | 1323 | */ |
1324 | return; | 1324 | goto out; |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | if (fc_fcp_lock_pkt(fsp)) | 1327 | if (fc_fcp_lock_pkt(fsp)) |
1328 | return; | 1328 | goto out; |
1329 | 1329 | ||
1330 | /* | 1330 | /* |
1331 | * raced with eh timeout handler. | 1331 | * raced with eh timeout handler. |
1332 | */ | 1332 | */ |
1333 | if (!fsp->seq_ptr || !fsp->wait_for_comp) { | 1333 | if (!fsp->seq_ptr || !fsp->wait_for_comp) |
1334 | spin_unlock_bh(&fsp->scsi_pkt_lock); | 1334 | goto out_unlock; |
1335 | return; | ||
1336 | } | ||
1337 | 1335 | ||
1338 | fh = fc_frame_header_get(fp); | 1336 | fh = fc_frame_header_get(fp); |
1339 | if (fh->fh_type != FC_TYPE_BLS) | 1337 | if (fh->fh_type != FC_TYPE_BLS) |
1340 | fc_fcp_resp(fsp, fp); | 1338 | fc_fcp_resp(fsp, fp); |
1341 | fsp->seq_ptr = NULL; | 1339 | fsp->seq_ptr = NULL; |
1342 | fsp->lp->tt.exch_done(seq); | 1340 | fsp->lp->tt.exch_done(seq); |
1343 | fc_frame_free(fp); | 1341 | out_unlock: |
1344 | fc_fcp_unlock_pkt(fsp); | 1342 | fc_fcp_unlock_pkt(fsp); |
1343 | out: | ||
1344 | fc_frame_free(fp); | ||
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | /** | 1347 | /** |