CVE-2026-74308: ext4: fix kernel BUG in ext4_write_inline_data_end
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix kernel BUG in ext4writeinlinedataend
When the data=journal mount option is used, the ext4journalledwriteend() function incorrectly calls ext4writeinlinedataend() without checking if the EXT4STATEMAYINLINEDATA flag is still set on the inode.
If a previous attempt to convert the inline data to an extent failed (e.g. due to ENOSPC), the EXT4STATEMAYINLINEDATA flag is cleared, but the EXT4INODEINLINEDATA flag remains set. In this scenario, the next call to ext4writebegin() will not prepare the inline data xattr for writing, but ext4journalledwriteend() will incorrectly attempt to write to it, triggering a BUGON(pos + len > EXT4I(inode)->iinlinesize) in ext4writeinlinedata() since iinlinesize was not expanded.
Fix this by ensuring that ext4journalledwriteend() only calls ext4writeinlinedataend() if the EXT4STATEMAYINLINEDATA flag is set, mirroring the behavior of ext4writeend() and ext4dawriteend().