]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/nldev: Reshuffle the code to avoid need to rebind QP in error path
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 2 Oct 2019 11:56:27 +0000 (14:56 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 4 Oct 2019 18:29:55 +0000 (15:29 -0300)
commit7fc77492855c8ac7eacd762dc762fa40f1b21e8b
tree02b6260a56d432844e6369986ad4013fa904114c
parent9386c3e3fc54a4ef858215d12c36f391079e9bab
RDMA/nldev: Reshuffle the code to avoid need to rebind QP in error path

Properly unwind QP counter rebinding in case of failure.

Trying to rebind the counter after unbiding it is not going to work
reliably, move the unbind to the end so it doesn't have to be unwound.

Fixes: f5b05472a469 ("RDMA/nldev: Allow counter manual mode configration through RDMA netlink")
Link: https://lore.kernel.org/r/20191002115627.16740-1-leon@kernel.org
Reviewed-by: Mark Zhang <markz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/nldev.c