]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fcloop: Fix dropped LS's to removed target port
authorJames Smart <jsmart2021@gmail.com>
Thu, 9 Aug 2018 23:00:14 +0000 (16:00 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 28 Aug 2018 06:40:43 +0000 (08:40 +0200)
commit2f7e6ed1959e417e52bf924077d45fae5db6611d
tree5add40a243185533b2e5d23f3afea87525f28668
parent8a4696ffd4df08744c4b545c1621f9895f6d99ec
nvme-fcloop: Fix dropped LS's to removed target port

When a targetport is removed from the config, fcloop will avoid calling
the LS done() routine thinking the targetport is gone. This leaves the
initiator reset/reconnect hanging as it waits for a status on the
Create_Association LS for the reconnect.

Change the filter in the LS callback path. If tport null (set when
failed validation before "sending to remote port"), be sure to call
done. This was the main bug. But, continue the logic that only calls
done if tport was set but there is no remoteport (e.g. case where
remoteport has been removed, thus host doesn't expect a completion).

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fcloop.c