summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@linux.dev>2022-09-02 18:00:53 +0800
committerJens Axboe <axboe@kernel.dk>2022-09-05 11:46:42 -0600
commit095134fbc2d4126d0575485e52139967f0771e30 (patch)
tree6c62a0a51b663dee0596cbe0ea13da857c149945 /drivers/block
parentbdb7d420c6f6d2618d4c907cd7742c3195c425e2 (diff)
downloadlinux-stable-095134fbc2d4126d0575485e52139967f0771e30.tar.gz
linux-stable-095134fbc2d4126d0575485e52139967f0771e30.tar.bz2
linux-stable-095134fbc2d4126d0575485e52139967f0771e30.zip
rnbd-srv: add comment in rnbd_srv_rdma_ev
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rnbd/rnbd-srv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
index 3f6c268e04ef..a229dd87c322 100644
--- a/drivers/block/rnbd/rnbd-srv.c
+++ b/drivers/block/rnbd/rnbd-srv.c
@@ -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;
}