]> git.baikalelectronics.ru Git - kernel.git/commitdiff
rnbd-srv: add comment in rnbd_srv_rdma_ev
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Fri, 2 Sep 2022 10:00:53 +0000 (18:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Sep 2022 17:46:42 +0000 (11:46 -0600)
Let's add some explanations here given the err handling is not obvious.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Link: https://lore.kernel.org/r/20220902100055.25724-2-guoqing.jiang@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-srv.c

index 3f6c268e04ef84af92af291a7d05434865cce24d..a229dd87c322d06cca587502989ab6e55be62391 100644 (file)
@@ -402,6 +402,11 @@ static int rnbd_srv_rdma_ev(void *priv,
                return -EINVAL;
        }
 
+       /*
+        * Since ret is passed to rtrs to handle the failure case, we
+        * just return 0 at the end otherwise callers in rtrs would call
+        * send_io_resp_imm again to print redundant err message.
+        */
        rtrs_srv_resp_rdma(id, ret);
        return 0;
 }