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

Configure Feed

Select the types of activity you want to include in your feed.

ext2: 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.

Signed-off-by: David Carlier <devnexen@gmail.com>
Link: https://patch.msgid.link/20260405154717.4705-1-devnexen@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

David Carlier and committed by
Jan Kara
98299953 e93ab401

+1 -1
+1 -1
fs/ext2/super.c
··· 1151 1151 goto failed_mount2; 1152 1152 } 1153 1153 sbi->s_gdb_count = db_count; 1154 - get_random_bytes(&sbi->s_next_generation, sizeof(u32)); 1154 + sbi->s_next_generation = get_random_u32(); 1155 1155 spin_lock_init(&sbi->s_next_gen_lock); 1156 1156 1157 1157 /* per filesystem reservation list head & lock */