]> git.ipfire.org Git - thirdparty/linux.git/commit
ext4: Allocate mapping_metadata_bhs struct on demand
authorJan Kara <jack@suse.cz>
Mon, 27 Jul 2026 10:49:22 +0000 (12:49 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 27 Jul 2026 14:25:31 +0000 (16:25 +0200)
commitdaca0f43a9345c62bc081fbcdf6c677d55dcf2e6
tree8ae8ae3f58af4fc1edadb5d26c5608ee054deebb
parent5a499dad2c794c19bf8ad51429dce1d53d9d3e12
ext4: Allocate mapping_metadata_bhs struct on demand

Currently every ext4 inode gets mapping_metadata_bhs struct although it
is only needed when running without a journal and only for inodes where
any metadata was dirtied. Allocate mapping_metadata_bhs struct on demand
when dirtying the first metadata buffer for the inode.

Acked-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260727104923.3828017-24-jack@suse.cz
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.c
fs/ext4/fsync.c
fs/ext4/inode.c
fs/ext4/super.c