mirror of https://gitee.com/openkylin/linux.git
mtd: mtd_stresstest: use prandom_bytes()
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Artem Bityutskiy <dedekind1@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Laight <david.laight@aculab.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Michel Lespinasse <walken@google.com> Cc: Robert Love <robert.w.love@intel.com> Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a312b78b0a
commit
4debec7abc
|
@ -282,8 +282,7 @@ static int __init mtd_stresstest_init(void)
|
|||
}
|
||||
for (i = 0; i < ebcnt; i++)
|
||||
offsets[i] = mtd->erasesize;
|
||||
for (i = 0; i < bufsize; i++)
|
||||
writebuf[i] = random32();
|
||||
prandom_bytes(writebuf, bufsize);
|
||||
|
||||
err = scan_for_bad_eraseblocks();
|
||||
if (err)
|
||||
|
|
Loading…
Reference in New Issue