Skip to content

Commit 0cab440

Browse files
Amit EngelChristoph Hellwig
authored andcommitted
nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association
As part of nvmet_fc_ls_create_association there is a case where nvmet_fc_alloc_target_queue fails right after a new association with an admin queue is created. In this case, no one releases the get taken in nvmet_fc_alloc_target_assoc. This fix is adding the missing put. Signed-off-by: Amit Engel <[email protected]> Reviewed-by: James Smart <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 81ea42b commit 0cab440

File tree

1 file changed

+3
-1
lines changed
  • drivers/nvme/target

1 file changed

+3
-1
lines changed

drivers/nvme/target/fc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,8 +1685,10 @@ nvmet_fc_ls_create_association(struct nvmet_fc_tgtport *tgtport,
16851685
else {
16861686
queue = nvmet_fc_alloc_target_queue(iod->assoc, 0,
16871687
be16_to_cpu(rqst->assoc_cmd.sqsize));
1688-
if (!queue)
1688+
if (!queue) {
16891689
ret = VERR_QUEUE_ALLOC_FAIL;
1690+
nvmet_fc_tgt_a_put(iod->assoc);
1691+
}
16901692
}
16911693
}
16921694

0 commit comments

Comments
 (0)