ext4: refactor the inline directory conversion and new directory codepaths
authorTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jul 2025 18:12:49 +0000 (14:12 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 18 Jul 2025 03:25:21 +0000 (23:25 -0400)
commit90f097b1403f232a202c501bfd49b1b196e840ea
treeeeffaf6076423134c72101428bf9feb3c3661f12
parenta35454ecf8a320c49954fdcdae0e8d3323067632
ext4: refactor the inline directory conversion and new directory codepaths

There was a lot of common code in the codepaths used to convert an
inline directory and to creaet a new directory.  To address this,
rename ext4_init_dot_dotdot() to ext4_init_dirblock() and then move
common code into that function.

This reduces the lines of code count in fs/ext4/inline.c and
fs/ext4/namei.c, as well as reducing the size of their object files.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://patch.msgid.link/20250712181249.434530-3-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/inline.c
fs/ext4/namei.c