From: Simon Glass <simon.glass@canonical.com> Call ext4_init_mballoc() from ext4l_probe() when CONFIG_EXT4_WRITE is enabled to initialise the multi-block allocator caches before any write operations. Include ext4.h to get the function declaration. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/interface.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/ext4l/interface.c b/fs/ext4l/interface.c index 546017efd16..ca71843b58e 100644 --- a/fs/ext4l/interface.c +++ b/fs/ext4l/interface.c @@ -41,6 +41,13 @@ int ext4l_probe(struct blk_desc *fs_dev_desc, return ret; } + /* Initialise multi-block allocator for write support */ + if (IS_ENABLED(CONFIG_EXT4_WRITE)) { + ret = ext4_init_mballoc(); + if (ret) + return ret; + } + buf = malloc(BLOCK_SIZE + 512); if (!buf) return -ENOMEM; -- 2.43.0