[PATCH 0/2] ext4: fix two journal credit shortfalls behind one syzbot report

From: William Chuang

Date: Tue Nov 17 2026 - 00:28:13 EST


syzbot report e8180f5590685cbc9037 ("WARNING in jbd2_journal_dirty_metadata
(4)") collects crashes from two separate paths. Both hit the same WARN:
a handle dirties a new metadata block after its credits are used up.

1. EXT4_IOC_SWAP_BOOT: swap_inode_boot_loader() reserves 2 credits, then
updates quota under the same handle (crashes of 15 and 16 Nov).

2. Inline data buffered write with a short user copy:
ext4_generic_write_inline_data() reserves 1 credit, and
ext4_write_inline_data_end() then calls ext4_orphan_add() (crashes of
12-14 Nov, x86_64 and arm64, including data=journal).

Both were reproduced on UML at 666539eec ("Merge tag
'assoc-array-fixes-v2'") with small standalone reproducers, before and
after each fix; details are in each changelog. One patch per path, so
each can be reviewed alone. Both patches carry the same Reported-by
tag, and the report closes only when both are applied.

William Chuang (2):
ext4: reserve quota credits in swap_inode_boot_loader()
ext4: reserve an orphan credit for inline data writes

fs/ext4/inline.c | 7 ++++++-
fs/ext4/ioctl.c | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)

--
2.43.0