nvmet-fc: put ref when assoc->del_work is already scheduled
[ Upstream commit 70289ae5cac4d3a39575405aaf63330486cea030 ] Do not leak the tgtport reference when the work is already scheduled. Signed-off-by: Daniel Wagner <wagi@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e45e8f0dd3
commit
f444c139e8
@@ -1091,7 +1091,8 @@ static void
|
||||
nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc)
|
||||
{
|
||||
nvmet_fc_tgtport_get(assoc->tgtport);
|
||||
queue_work(nvmet_wq, &assoc->del_work);
|
||||
if (!queue_work(nvmet_wq, &assoc->del_work))
|
||||
nvmet_fc_tgtport_put(assoc->tgtport);
|
||||
}
|
||||
|
||||
static struct nvmet_fc_tgt_assoc *
|
||||
|
Reference in New Issue
Block a user