mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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>
This commit is contained in:
parent
e93ab401da
commit
9829995382
|
|
@ -1151,7 +1151,7 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||
goto failed_mount2;
|
||||
}
|
||||
sbi->s_gdb_count = db_count;
|
||||
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
|
||||
sbi->s_next_generation = get_random_u32();
|
||||
spin_lock_init(&sbi->s_next_gen_lock);
|
||||
|
||||
/* per filesystem reservation list head & lock */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user