mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
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 <agruenba@redhat.com>
This commit is contained in:
parent
085e423b4d
commit
0c5bee608f
@ -1987,10 +1987,8 @@ static bool gfs2_rgrp_used_recently(const struct gfs2_blkreserv *rs,
|
||||
static u32 gfs2_orlov_skip(const struct gfs2_inode *ip)
|
||||
{
|
||||
const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
|
||||
u32 skip;
|
||||
|
||||
get_random_bytes(&skip, sizeof(skip));
|
||||
return skip % sdp->sd_rgrps;
|
||||
return get_random_u32() % sdp->sd_rgrps;
|
||||
}
|
||||
|
||||
static bool gfs2_select_rgrp(struct gfs2_rgrpd **pos, const struct gfs2_rgrpd *begin)
|
||||
|
Loading…
Reference in New Issue
Block a user