]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-fc: check successful reference in nvmet_fc_find_target_assoc
authorJames Smart <jsmart2021@gmail.com>
Fri, 24 Jul 2020 16:40:00 +0000 (09:40 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:20 +0000 (07:45 +0200)
commit7646f5378d81ec1411c3897e38912b6780ddd820
tree5acd7696d553e6e96cfb6696320793914a1ef913
parent2856afee4092b053cea291f97c27b069742934f3
nvmet-fc: check successful reference in nvmet_fc_find_target_assoc

When searching for an association based on an association id, when there
is a match, the code takes a reference. However, it is not validating
that the reference taking was successful.

Check the status of the reference. If unsuccessful, the device is being
deleted and should be ignored.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fc.c