RDMA/rtrs-srv: Refactor the handling of failure case in map_cont_bufs
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Thu, 17 Nov 2022 10:19:39 +0000 (18:19 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 17 Nov 2022 11:47:28 +0000 (13:47 +0200)
commit0f597ac618d04beb9de997fda59a29c9d3818fb2
tree402ca35e477bd177dbc43824d9fcc3ca02b714d3
parentd7115727e32e94c77a5441892e74ae0339afa1a5
RDMA/rtrs-srv: Refactor the handling of failure case in map_cont_bufs

Let's call unmap_cont_bufs when failure happens, and also only update
mrs_num after everything is settled which means we can remove 'mri'.

Acked-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20221117101945.6317-3-guoqing.jiang@linux.dev
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-srv.c