diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-04-30 01:21:29 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 03:28:42 +0200 |
commit | d3d30417d32adb5bec041f2c3988b5f91c4e7eec (patch) | |
tree | 276a0528d5f487acc0a0268f181f09d3037cd23c /mm/swapfile.c | |
parent | lib/: rename random32() to prandom_u32() (diff) | |
download | linux-d3d30417d32adb5bec041f2c3988b5f91c4e7eec.tar.xz linux-d3d30417d32adb5bec041f2c3988b5f91c4e7eec.zip |
mm/: rename random32() to prandom_u32()
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | mm/swapfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index a1f7772a01fc..d417efddfe74 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2120,7 +2120,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; |