Commit 925cac63 authored by Jack Wang's avatar Jack Wang Committed by Jason Gunthorpe

RDMA/rtrs-clt: Fix the initial value of min_latency

The type of min_latency is ktime_t, so use KTIME_MAX to initialize the
initial value.

Fixes: dc3b66a0 ("RDMA/rtrs-clt: Add a minimum latency multipath policy")
Link: https://lore.kernel.org/r/20211124081040.19533-1-jinpu.wang@ionos.comSigned-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Reviewed-by: default avatarGuoqing Jiang <Guoqing.Jiang@linux.dev>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 8d0d2b0f
......@@ -867,7 +867,7 @@ static struct rtrs_clt_sess *get_next_path_min_latency(struct path_it *it)
struct rtrs_clt_sess *min_path = NULL;
struct rtrs_clt *clt = it->clt;
struct rtrs_clt_sess *sess;
ktime_t min_latency = INT_MAX;
ktime_t min_latency = KTIME_MAX;
ktime_t latency;
list_for_each_entry_rcu(sess, &clt->paths_list, s.entry) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment