]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
initramfs: Use struct_size() helper to improve dir_add()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 12 Sep 2025 06:52:57 +0000 (08:52 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 15 Sep 2025 12:42:56 +0000 (14:42 +0200)
commite60625e7ce10f696690d9e36a9f32fc7c1897f79
treea685e9ed4caf0b9fc268d2b3655b0c1b076043d3
parent84f1766bdba5a6394618a45b34a320f336b02d95
initramfs: Use struct_size() helper to improve dir_add()

Use struct_size() to calculate the number of bytes to allocate for a new
directory entry.  No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Christian Brauner <brauner@kernel.org>
init/initramfs.c