public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Nil Yi <teroincn@163.com>
To: james.smart@broadcom.com, linux-nvme@lists.infradead.org
Subject: [PATCH] nvme: target: set NULL to iod after assoc refcnt is released
Date: Sat, 14 Aug 2021 21:06:58 +0800	[thread overview]
Message-ID: <20210814130658.GA68215@nilus-desk> (raw)

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

Signed-off-by: Nil Yi <teroincn@163.com>
---
 drivers/nvme/target/fc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index c6c1839b4..8114cf678 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -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
-- 
2.17.1



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

                 reply	other threads:[~2021-08-14 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210814130658.GA68215@nilus-desk \
    --to=teroincn@163.com \
    --cc=james.smart@broadcom.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox