RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Thu, 17 Nov 2022 10:19:40 +0000 (18:19 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 17 Nov 2022 11:47:28 +0000 (13:47 +0200)
commit102d2f70ec0999a5cde181f1ccbe8a81cba45b10
tree36b3545d71b2d41c46261ca17a12141311b50105
parent0f597ac618d04beb9de997fda59a29c9d3818fb2
RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg

We should check with nr_sgt, also the only successful case is that
all sg elements are mapped, so make it explicitly.

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20221117101945.6317-4-guoqing.jiang@linux.dev
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-srv.c