IB/cm: Call the correct message free functions in cm_send_handler()
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 2 Jun 2021 10:27:03 +0000 (13:27 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 2 Jun 2021 18:41:57 +0000 (15:41 -0300)
commitc1cf6d9f743aad09b231752c12845ba7083b28f7
tree76ec09f930470bffb7f0efad5bcca8fc7d8e8d26
parent4b4e586ebe37c8c7e2a4bf46dc4b742756fd788d
IB/cm: Call the correct message free functions in cm_send_handler()

There are now three destroy functions for the cm_msg, and all places
except the general send completion handler use the correct function.

Fix cm_send_handler() to detect which kind of message is being completed
and destroy it using the correct function with the correct locking.

Link: https://lore.kernel.org/r/62a507195b8db85bb11228d0c6e7fa944204bf12.1622629024.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/cm.c