Skip to content

Commit 0c5bee6

Browse files
author
Andreas Gruenbacher
committed
gfs2: Use get_random_u32 in gfs2_orlov_skip
Use get_random_u32() instead of get_random_bytes() to remove the last remaining call to get_random_bytes(). Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 085e423 commit 0c5bee6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/gfs2/rgrp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,10 +1987,8 @@ static bool gfs2_rgrp_used_recently(const struct gfs2_blkreserv *rs,
19871987
static u32 gfs2_orlov_skip(const struct gfs2_inode *ip)
19881988
{
19891989
const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1990-
u32 skip;
19911990

1992-
get_random_bytes(&skip, sizeof(skip));
1993-
return skip % sdp->sd_rgrps;
1991+
return get_random_u32() % sdp->sd_rgrps;
19941992
}
19951993

19961994
static bool gfs2_select_rgrp(struct gfs2_rgrpd **pos, const struct gfs2_rgrpd *begin)

0 commit comments

Comments
 (0)