]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drbd: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 23 Mar 2013 02:33:00 +0000 (13:33 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Mar 2013 05:11:40 +0000 (16:11 +1100)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/drbd/drbd_receiver.c

index 1921871ca9a8f30ad1294110dacbd46a3d0ebe2b..266143a35a025cd4b1d3ad2cae61170f4df5c10e 100644 (file)
@@ -757,7 +757,8 @@ static struct socket *drbd_wait_for_connect(struct drbd_tconn *tconn, struct acc
        rcu_read_unlock();
 
        timeo = connect_int * HZ;
-       timeo += (random32() & 1) ? timeo / 7 : -timeo / 7; /* 28.5% random jitter */
+       /* 28.5% random jitter */
+       timeo += (prandom_u32() & 1) ? timeo / 7 : -timeo / 7;
 
        err = wait_for_completion_interruptible_timeout(&ad->door_bell, timeo);
        if (err <= 0)
@@ -953,7 +954,7 @@ retry:
                                conn_warn(tconn, "Error receiving initial packet\n");
                                sock_release(s);
 randomize:
-                               if (random32() & 1)
+                               if (prandom_u32() & 1)
                                        goto retry;
                        }
                }