Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -3
+1 -3
fs/gfs2/rgrp.c
··· 1987 1987 static u32 gfs2_orlov_skip(const struct gfs2_inode *ip) 1988 1988 { 1989 1989 const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1990 - u32 skip; 1991 1990 1992 - get_random_bytes(&skip, sizeof(skip)); 1993 - return skip % sdp->sd_rgrps; 1991 + return get_random_u32() % sdp->sd_rgrps; 1994 1992 } 1995 1993 1996 1994 static bool gfs2_select_rgrp(struct gfs2_rgrpd **pos, const struct gfs2_rgrpd *begin)