diff options
Diffstat (limited to 'mm/swapfile.c')
-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; |