Skip to content

Commit 6c9340a

Browse files
devnexenakpm00
authored andcommitted
ocfs2: use get_random_u32() where appropriate
Use the typed random integer helpers instead of get_random_bytes() when filling a single integer variable. The helpers return the value directly, require no pointer or size argument, and better express intent. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Carlier <[email protected] Acked-by: Joseph Qi <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Changwei Ge <[email protected]> Cc: Jun Piao <[email protected]> Cc: Heming Zhao <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent d647c5b commit 6c9340a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/ocfs2/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
21242124
osb->osb_cluster_stack[0] = '\0';
21252125
}
21262126

2127-
get_random_bytes(&osb->s_next_generation, sizeof(u32));
2127+
osb->s_next_generation = get_random_u32();
21282128

21292129
/*
21302130
* FIXME

0 commit comments

Comments
 (0)