Commit 3f127ad9 authored by Vasu Dev's avatar Vasu Dev Committed by James Bottomley

[SCSI] libfc: adds missing exch release for accepted RRQ

Adds missing exch release when RRQ is accepted by calling
fc_seq_ls_acc. Adds common exch release for fc_exch_els_rrq
by use of out label.
Reported-by: default avatarAlex Lyakas <alexl@mellanox.co.il>
Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 89f19a59
...@@ -1718,7 +1718,7 @@ static void fc_exch_rrq(struct fc_exch *ep) ...@@ -1718,7 +1718,7 @@ static void fc_exch_rrq(struct fc_exch *ep)
*/ */
static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp) static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp)
{ {
struct fc_exch *ep; /* request or subject exchange */ struct fc_exch *ep = NULL; /* request or subject exchange */
struct fc_els_rrq *rp; struct fc_els_rrq *rp;
u32 sid; u32 sid;
u16 xid; u16 xid;
...@@ -1768,15 +1768,16 @@ static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp) ...@@ -1768,15 +1768,16 @@ static void fc_exch_els_rrq(struct fc_seq *sp, struct fc_frame *fp)
* Send LS_ACC. * Send LS_ACC.
*/ */
fc_seq_ls_acc(sp); fc_seq_ls_acc(sp);
fc_frame_free(fp); goto out;
return;
unlock_reject: unlock_reject:
spin_unlock_bh(&ep->ex_lock); spin_unlock_bh(&ep->ex_lock);
fc_exch_release(ep); /* drop hold from fc_exch_find */
reject: reject:
fc_seq_ls_rjt(sp, ELS_RJT_LOGIC, explan); fc_seq_ls_rjt(sp, ELS_RJT_LOGIC, explan);
out:
fc_frame_free(fp); fc_frame_free(fp);
if (ep)
fc_exch_release(ep); /* drop hold from fc_exch_find */
} }
struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport, struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *lport,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment