aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2009-01-06 17:39:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:06 -0500
commitf0d7a4b3ed46816f5097d521850a8ab7a0d40f3c (patch)
tree521a69aea8b8b67e706f46d602a08c9aca1defd9 /mm/swapfile.c
parent858a29900ea2d639759e697be901a60b759cdcfb (diff)
swapfile: let others seed random
Remove the srandom32((u32)get_seconds()) from non-rotational swapon: there's been a coincidental discussion of earlier randomization, assume that goes ahead, let swapon be a client rather than stirring for itself. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Donjun Shin <djshin90@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Joern Engel <joern@logfs.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Tejun Heo <teheo@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 6a078557306a..d00523601913 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1851,7 +1851,6 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
1851 1851
1852 if (blk_queue_nonrot(bdev_get_queue(p->bdev))) { 1852 if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
1853 p->flags |= SWP_SOLIDSTATE; 1853 p->flags |= SWP_SOLIDSTATE;
1854 srandom32((u32)get_seconds());
1855 p->cluster_next = 1 + (random32() % p->highest_bit); 1854 p->cluster_next = 1 + (random32() % p->highest_bit);
1856 } 1855 }
1857 if (discard_swap(p) == 0) 1856 if (discard_swap(p) == 0)