ext4: use struct_size() to improve ext4_htree_store_dirent()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 5 Nov 2024 10:33:54 +0000 (11:33 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 13 Nov 2024 17:56:48 +0000 (12:56 -0500)
commitd5e9836e13a53ef36af702d87ab20d1a126b0fb8
tree7ed4739eaaecfed91d2317fba6e7426ae0caba7e
parentde183b2baf90f0acc1854a3998c14b8b228f9643
ext4: use struct_size() to improve ext4_htree_store_dirent()

Inline and use struct_size() to calculate the number of bytes to
allocate for new_fn and remove the local variable len.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20241105103353.11590-2-thorsten.blum@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/dir.c