Skip to contentSkip to conversation

nvme: target: set NULL to iod after assoc refcnt is released

PATCH New Nil Yi 1 participant 1 message Aug 14, 2021

Subsystems (3)
lore
Share & tools
lore

Nil Yi

author
#0 lore raw

PATCH 1/1 nvme: target: set NULL to iod after assoc refcnt is released

After the refcount of assoc is released, the corresponding pointer should be set to NULL.

---
 drivers/nvme/target/fc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/target/fc.c +1 -0
index c6c1839b4..8114cf678 100644
@@ -1870,6 +1870,7 @@ nvmet_fc_ls_disconnect(struct nvmet_fc_tgtport *tgtport,
 
 	/* release get taken in nvmet_fc_find_target_assoc */
 	nvmet_fc_tgt_a_put(assoc);
+	iod->assoc = NULL;
 
 	/*
 	 * The rules for LS response says the response cannot
Signature · 8 lines
2.17.1



_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme