Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / drivers / block / drbd / drbd_receiver.c
index 0f449bb..4222aff 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)
@@ -954,7 +955,7 @@ retry:
                                conn_warn(tconn, "Error receiving initial packet\n");
                                sock_release(s);
 randomize:
-                               if (random32() & 1)
+                               if (prandom_u32() & 1)
                                        goto retry;
                        }
                }