nvme-rdma: rework rdma connection establishment error path
authorSagi Grimberg <sagi@grimberg.me>
Thu, 4 May 2017 10:33:10 +0000 (13:33 +0300)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Jun 2017 12:28:20 +0000 (14:28 +0200)
commitabf87d5e9d57920c7ee1dacdf0929783a6a4c9af
treeb5139df59c0c3f79dbbff6e3ef8dee4ba628b745
parentca6e95bb0a2ac11ae7a04e5cc53c709522af5144
nvme-rdma: rework rdma connection establishment error path

Instead of introducing a flag for if the queue is allocated,
simply free the rdma resources when we get the error.

We allocate the queue rdma resources when we have an address
resolution, their we allocate (or take a reference on) our device
so we should free it when we have error after the address resolution
namely:
1. route resolution error
2. connect reject
3. connect error
4. peer unreachable error

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c