Re: [PATCH 1/2] ext4: skip extra isize expansion during mount to prevent deadlock
From: Theodore Ts'o
Date: Thu Jul 23 2026 - 09:18:03 EST
On Tue, 23 Jun 2026 14:19:02 +0800, Yun Zhou wrote:
> ext4_try_to_expand_extra_isize() is called from __ext4_mark_inode_dirty()
> while holding an active jbd2 handle. During mount (!SB_ACTIVE), the
> expand path may move xattrs to external blocks and release ea_inodes via
> iput(). When !SB_ACTIVE, iput() calls write_inode_now() which acquires
> s_writepages_rwsem, creating a circular lock dependency:
>
> s_writepages_rwsem --> jbd2_handle --> xattr_sem --> s_writepages_rwsem
>
> [...]
Applied, thanks!
[1/2] ext4: skip extra isize expansion during mount to prevent deadlock
commit: 7461c60b9c6a839b13ad4c3490681a0cf5aa0637
[2/2] ext4: set EXT4_STATE_NO_EXPAND in ext4_evict_inode
commit: 2c0e4fb511f97467dafc91b6afb3414100289081
Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>