Skip to content

Commit d3d3041

Browse files
mitatorvalds
authored andcommitted
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>
1 parent f39fee5 commit d3d3041

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/swapfile.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
21202120
if (p->bdev) {
21212121
if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
21222122
p->flags |= SWP_SOLIDSTATE;
2123-
p->cluster_next = 1 + (random32() % p->highest_bit);
2123+
p->cluster_next = 1 + (prandom_u32() % p->highest_bit);
21242124
}
21252125
if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
21262126
p->flags |= SWP_DISCARDABLE;

0 commit comments

Comments
 (0)