Re: [PATCH 1/2] ext4: skip extra isize expansion during mount to prevent deadlock

"Theodore Ts'o" <[email protected]>
Newsgroups org.kernel.vger.linux-ext4,org.kernel.vger.linux-kernel
Message-ID <178481171720.796182.8518231772987734798.b4-ty@b4>
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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.