net/netfilter: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:39 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:43 +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: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/netfilter/nf_conntrack_core.c

index c8e001a9c45b15a8fe4038845f2111c6470c67b7..f84965af4a4e7ed6af402e1d6be7d3109e1de508 100644 (file)
@@ -264,7 +264,7 @@ static void death_by_event(unsigned long ul_conntrack)
        if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
                /* bad luck, let's retry again */
                ecache->timeout.expires = jiffies +
-                       (random32() % net->ct.sysctl_events_retry_timeout);
+                       (prandom_u32() % net->ct.sysctl_events_retry_timeout);
                add_timer(&ecache->timeout);
                return;
        }
@@ -283,7 +283,7 @@ void nf_ct_dying_timeout(struct nf_conn *ct)
        /* set a new timer to retry event delivery */
        setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
        ecache->timeout.expires = jiffies +
-               (random32() % net->ct.sysctl_events_retry_timeout);
+               (prandom_u32() % net->ct.sysctl_events_retry_timeout);
        add_timer(&ecache->timeout);
 }
 EXPORT_SYMBOL_GPL(nf_ct_dying_timeout);