projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f39fee5
)
mm/: rename random32() to prandom_u32()
author
Akinobu Mita
<
[email protected]
>
Mon, 29 Apr 2013 23:21:29 +0000
(16:21 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 30 Apr 2013 01:28:42 +0000
(18:28 -0700)
Use preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/swapfile.c
patch
|
blob
|
history
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index a1f7772a01fcd7e986ac9e0b91aa7d5c0579cbe5..d417efddfe7432606d315b1197f059519ebd7909 100644
(file)
--- 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 + (
random
32() % p->highest_bit);
+ p->cluster_next = 1 + (
prandom_u
32() % p->highest_bit);
}
if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
p->flags |= SWP_DISCARDABLE;