summaryrefslogtreecommitdiff
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2026-04-05 16:47:20 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-04-15 02:15:03 -0700
commit6c9340a2ff2b32cc4477cc6c2a969855195bf9a3 (patch)
tree9e9ac74874dc0176a6a14c82822fc806622c19a5 /fs/ocfs2
parentd647c5b2fbf81560818dacade360abc8c00a9665 (diff)
downloadlwn-6c9340a2ff2b32cc4477cc6c2a969855195bf9a3.tar.gz
lwn-6c9340a2ff2b32cc4477cc6c2a969855195bf9a3.zip
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/20260405154720.4732-1-devnexen@gmail.com Signed-off-by: David Carlier <devnexen@gmail.com Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Jun Piao <piaojun@huawei.com> Cc: Heming Zhao <heming.zhao@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index d7c58fd7d438..b875f01c9756 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2124,7 +2124,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
osb->osb_cluster_stack[0] = '\0';
}
- get_random_bytes(&osb->s_next_generation, sizeof(u32));
+ osb->s_next_generation = get_random_u32();
/*
* FIXME