mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
nvmet-fc: put ref when assoc->del_work is already scheduled
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>
This commit is contained in:
parent
b0b26ad0e1
commit
70289ae5ca
|
|
@ -1073,7 +1073,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 bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user