Re: [PATCH 3/8] RDMA/rtrs-srv: Correct the checking of ib_map_mr_sg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 16, 2022 at 12:14 PM Guoqing Jiang <guoqing.jiang@xxxxxxxxx> wrote:
>
> We should check with nr_sgt, also the only successful case is that
> all sg elements are mapped, so make it explict.
typo, s/explicit/explicitly.
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx>
> ---
>  drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> index b877dd57b6b9..581c850e71d6 100644
> --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
> @@ -622,7 +622,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path)
>                 }
>                 nr = ib_map_mr_sg(mr, sgt->sgl, nr_sgt,
>                                   NULL, max_chunk_size);
> -               if (nr < 0 || nr < sgt->nents) {
> +               if (nr != nr_sgt) {
>                         err = nr < 0 ? nr : -EINVAL;
>                         goto dereg_mr;
>                 }
> --
> 2.31.1
>
Acked-by: Jack Wang <jinpu.wang@xxxxxxxxx>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux