drbd: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:31 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:42 +0000 (18:28 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/drbd/drbd_receiver.c

index a9eccfc6079b02e6fb2f9838a1728b76c9599582..83c5ae0ed56b4f1f41c7a655ad756e6f64766c26 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;
                        }
                }