aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext2/ialloc.c2
-rw-r--r--fs/ext3/ialloc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 7cadd823bb31..7d66fb0e4cca 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -284,7 +284,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
284 int best_ndir = inodes_per_group; 284 int best_ndir = inodes_per_group;
285 int best_group = -1; 285 int best_group = -1;
286 286
287 get_random_bytes(&group, sizeof(group)); 287 group = prandom_u32();
288 parent_group = (unsigned)group % ngroups; 288 parent_group = (unsigned)group % ngroups;
289 for (i = 0; i < ngroups; i++) { 289 for (i = 0; i < ngroups; i++) {
290 group = (parent_group + i) % ngroups; 290 group = (parent_group + i) % ngroups;
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 082afd78b107..a1b810230cc5 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -215,7 +215,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
215 int best_ndir = inodes_per_group; 215 int best_ndir = inodes_per_group;
216 int best_group = -1; 216 int best_group = -1;
217 217
218 get_random_bytes(&group, sizeof(group)); 218 group = prandom_u32();
219 parent_group = (unsigned)group % ngroups; 219 parent_group = (unsigned)group % ngroups;
220 for (i = 0; i < ngroups; i++) { 220 for (i = 0; i < ngroups; i++) {
221 group = (parent_group + i) % ngroups; 221 group = (parent_group + i) % ngroups;