mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
nvmet-fc: release reference on target port
[ Upstream commit c691e6d7e1
]
In case we return early out of __nvmet_fc_finish_ls_req() we still have
to release the reference on the target port.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
16b2b31ba8
commit
6319ab29d5
@ -359,7 +359,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop)
|
||||
|
||||
if (!lsop->req_queued) {
|
||||
spin_unlock_irqrestore(&tgtport->lock, flags);
|
||||
return;
|
||||
goto out_puttgtport;
|
||||
}
|
||||
|
||||
list_del(&lsop->lsreq_list);
|
||||
@ -372,6 +372,7 @@ __nvmet_fc_finish_ls_req(struct nvmet_fc_ls_req_op *lsop)
|
||||
(lsreq->rqstlen + lsreq->rsplen),
|
||||
DMA_BIDIRECTIONAL);
|
||||
|
||||
out_puttgtport:
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user