nvmet_fc: add missing reference in add_port
authorJames Smart <jsmart2021@gmail.com>
Tue, 11 Apr 2017 18:32:32 +0000 (11:32 -0700)
committerChristoph Hellwig <hch@lst.de>
Fri, 21 Apr 2017 14:41:51 +0000 (16:41 +0200)
Add missing reference in add_port

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/target/fc.c

index e5d30bbb1b10b5c953d9a65f0e0fe1061f7fc4be..4a44fd3485672814b3766218933638f8fd7e172b 100644 (file)
@@ -2377,6 +2377,7 @@ nvmet_fc_add_port(struct nvmet_port *port)
                        if (!tgtport->port) {
                                tgtport->port = port;
                                port->priv = tgtport;
+                               nvmet_fc_tgtport_get(tgtport);
                                ret = 0;
                        } else
                                ret = -EALREADY;