treewide: use prandom_u32_max() when possible, part 1
[linux-2.6-block.git] / net / ceph / mon_client.c
index 6a6898ee40495d9de053396ae29cf482c0a62c66..db60217f911b31ca04a768b3dee562d1d165ca02 100644 (file)
@@ -222,7 +222,7 @@ static void pick_new_mon(struct ceph_mon_client *monc)
                                max--;
                }
 
-               n = prandom_u32() % max;
+               n = prandom_u32_max(max);
                if (o >= 0 && n >= o)
                        n++;