]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 20 Mar 2013 04:08:45 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 22 Mar 2013 04:34:02 +0000 (15:34 +1100)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c

index b670d5ea4765bb6c6b8ed06bb864120e7411e9d3..6c340d908b274c7855b3abd0bdeadff56c8ffc92 100644 (file)
@@ -2121,7 +2121,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
        if (p->bdev) {
                if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
                        p->flags |= SWP_SOLIDSTATE;
-                       p->cluster_next = 1 + (random32() % p->highest_bit);
+                       p->cluster_next = 1 + (prandom_u32() % p->highest_bit);
                }
                if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
                        p->flags |= SWP_DISCARDABLE;