diff options
| author | Li Chen <me@linux.beauty> | 2026-05-15 17:18:22 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-06-03 10:26:35 -0400 |
| commit | 7f473f971382d73a58e386afa7efdaac294b89f0 (patch) | |
| tree | 39dd0643c77449551793739489ca0df9d829beed /drivers/phy/eswin/git@git.tavy.me:linux.git | |
| parent | e9c6e0b8e096255feb71ec996c77bdfbe9c36e91 (diff) | |
ext4: lockdep: handle i_data_sem subclassing for special inodes
Fast commit can hold s_fc_lock while writing journal blocks. Mapping the
journal inode can take its i_data_sem. Normal inode update paths can take a
data inode i_data_sem and then s_fc_lock, which makes lockdep report a
circular dependency.
lockdep treats all i_data_sem instances as one lock class and cannot
distinguish the journal inode i_data_sem from a regular inode i_data_sem.
The journal inode is not tracked by fast commit and no FC waiters ever
depend on it, so this is not a real ABBA deadlock. Assign the journal inode
a dedicated i_data_sem lockdep subclass to avoid the false positive.
Inode cache objects can be recycled, so also reset i_data_sem to
I_DATA_SEM_NORMAL when allocating an ext4 inode. Otherwise a new inode may
inherit an old subclass (journal/quota/ea) and trigger lockdep warnings.
Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
Link: https://patch.msgid.link/20260515091829.194810-3-me@linux.beauty
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
