Whamcloud - gitweb
LU-9859 libcfs: replace cfs_rand() with prandom_u32_max()
[fs/lustre-release.git] / lnet / lnet / router.c
index ec92e1a..599a8a1 100644 (file)
@@ -404,7 +404,7 @@ lnet_add_route_to_rnet(struct lnet_remotenet *rnet, struct lnet_route *route)
         * different nodes are using the same list of routers, they end up
         * preferring different routers.
         */
-       offset = cfs_rand() % (len + 1);
+       offset = prandom_u32_max(len + 1);
        list_for_each(e, &rnet->lrn_routes) {
                if (offset == 0)
                        break;