diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-04-29 19:21:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:42 -0400 |
commit | d3d30417d32adb5bec041f2c3988b5f91c4e7eec (patch) | |
tree | 276a0528d5f487acc0a0268f181f09d3037cd23c /mm | |
parent | f39fee5f11f7adfcf5c9643f87718b80450be18a (diff) |
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 'mm')
-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) | |||
2120 | if (p->bdev) { | 2120 | if (p->bdev) { |
2121 | if (blk_queue_nonrot(bdev_get_queue(p->bdev))) { | 2121 | if (blk_queue_nonrot(bdev_get_queue(p->bdev))) { |
2122 | p->flags |= SWP_SOLIDSTATE; | 2122 | p->flags |= SWP_SOLIDSTATE; |
2123 | p->cluster_next = 1 + (random32() % p->highest_bit); | 2123 | p->cluster_next = 1 + (prandom_u32() % p->highest_bit); |
2124 | } | 2124 | } |
2125 | if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0) | 2125 | if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0) |
2126 | p->flags |= SWP_DISCARDABLE; | 2126 | p->flags |= SWP_DISCARDABLE; |