Commit d3d30417 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

mm/: rename random32() to prandom_u32()

Use preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f39fee5f
...@@ -2120,7 +2120,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) ...@@ -2120,7 +2120,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
if (p->bdev) { if (p->bdev) {
if (blk_queue_nonrot(bdev_get_queue(p->bdev))) { if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
p->flags |= SWP_SOLIDSTATE; 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) if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
p->flags |= SWP_DISCARDABLE; p->flags |= SWP_DISCARDABLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment