Re: [PATCH] fs: revert insert_inode_locked() eviction wait change and explain why

From: Mateusz Guzik

Date: Tue Mar 17 2026 - 09:17:31 EST


On Tue, Mar 17, 2026 at 2:01 PM Jan Kara <jack@xxxxxxx> wrote:
>
> On Mon 16-03-26 11:33:05, Mateusz Guzik wrote:
> > It causes a deadlock, reproducer can be found here:
> > https://lore.kernel.org/linux-fsdevel/abNvb2PcrKj1FBeC@ly-workstation/
> >
> > The real bug is in ext4, but I'm not digging into it and a working order
> > needs to be restored.
>
> I can dig into that. I expect ext4 ends up calling find_inode() from its
> ext4_evict_inode() handler or something like that? I was searching for such
> occurrence for a while but I didn't find it so can you share where ext4
> blocked? Because the stacktraces from the original report just show the
> journalling machinery hangs but those are only side-effects of somebody
> hanging in ext4 with the transaction handle started... Thanks!
>

I patched hung task detector with this:
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 6fcc94ce4ca9..2bc86652d62f 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -266,6 +266,10 @@ static void hung_task_info(struct task_struct *t,
unsigned long timeout,

if (!sysctl_hung_task_warnings)
pr_info("Future hung task reports are
suppressed, see sysctl kernel.hung_task_warnings\n");
+
+
+ printk(KERN_CRIT "total dump:\n");
+ show_state_filter(TASK_UNINTERRUPTIBLE);
}

touch_nmi_watchdog();

all traces attached

Attachment: typescript
Description: Binary data