Kernel bug: INFO: task hung in erofs_bread
Subsystem: erofs
Status: fixed

Crash report:
INFO: task syz.0.17:6071 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.17        state:D
 stack:28424 pid:6071  tgid:6065  ppid:5989   task_flags:0x400040 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5360 [inline]
 __schedule+0x1798/0x4cc0 kernel/sched/core.c:6964
 __schedule_loop kernel/sched/core.c:7046 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:7061
 io_schedule+0x80/0xd0 kernel/sched/core.c:7906
 folio_wait_bit_common+0x6b0/0xb90 mm/filemap.c:1330
 folio_put_wait_locked mm/filemap.c:1494 [inline]
 do_read_cache_folio+0x1aa/0x590 mm/filemap.c:3973
 read_mapping_folio include/linux/pagemap.h:999 [inline]
 erofs_bread+0x46f/0x7f0 fs/erofs/data.c:40
 erofs_readdir+0x58a/0x1020 fs/erofs/dir.c:81
 iterate_dir+0x399/0x570 fs/readdir.c:108
 __do_sys_getdents64 fs/readdir.c:410 [inline]
 __se_sys_getdents64+0xe4/0x260 fs/readdir.c:396
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fee78f8eba9
RSP: 002b:00007fee79e56038 EFLAGS: 00000246
 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007fee791d6090 RCX: 00007fee78f8eba9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007fee79011e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fee791d6128 R14: 00007fee791d6090 R15: 00007ffcdf8b9388
 </TASK>

Showing all locks held in the system:
5 locks held by kworker/u8:0/12:
1 lock held by khungtaskd/31:
 #0: 
ffffffff8e33c820
 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6775
3 locks held by kworker/u8:2/35:
 #0: 
ffff88801a889148
 (
(wq_completion)events_unbound
){+.+.}-{0:0}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:636
 #1: ffff8880b8624008 (
psi_seq){-.-.}-{0:0}, at: process_one_work kernel/workqueue.c:3239 [inline]
psi_seq){-.-.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0 kernel/workqueue.c:3346
 #2: 
ffff88805488d250 (&devlink->lock_key#6){+.+.}-{4:4}, at: nsim_dev_trap_report_work+0x57/0xb80 drivers/net/netdevsim/dev.c:853
3 locks held by kswapd0/84:
2 locks held by getty/5630:
 #0: 
ffff88814dbd60a0
 (
&tty->ldisc_sem
){++++}-{0:0}
, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: 
ffffc9000332e2f0
 (
&ldata->atomic_read_lock
){+.+.}-{4:4}
, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222
3 locks held by syz.0.17/6067:
2 locks held by syz.0.17/6071:
 #0: ffff888031f5d438 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 fs/file.c:1232
 #1: ffff88805f1f86d0 (&type->i_mutex_dir_key#8){.+.+}-{4:4}, at: iterate_dir+0x292/0x570 fs/readdir.c:101
3 locks held by syz.1.18/6121:
2 locks held by syz.1.18/6123:
 #0: ffff888030faeb78 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 fs/file.c:1232
 #1: ffff8880300b06d0 (&type->i_mutex_dir_key#8){.+.+}-{4:4}, at: iterate_dir+0x292/0x570 fs/readdir.c:101
9 locks held by syz.2.19/6148:
2 locks held by syz.2.19/6149:
 #0: ffff88803210a9b8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 fs/file.c:1232
 #1: ffff8880300b1150 (&type->i_mutex_dir_key#8){.+.+}-{4:4}, at: iterate_dir+0x292/0x570 fs/readdir.c:101
8 locks held by syz.3.20/6172:
2 locks held by syz.3.20/6173:
 #0: 
ffff888021fe9b38
 (
&f->f_pos_lock
){+.+.}-{4:4}
, at: fdget_pos+0x247/0x320 fs/file.c:1232
 #1: 
ffff88805f1f9150
 (&type->i_mutex_dir_key#8){.+.+}-{4:4}, at: iterate_dir+0x292/0x570 fs/readdir.c:101
3 locks held by syz.4.21/6210:
2 locks held by syz.4.21/6211:
 #0: 
ffff88802f23e638
 (
&f->f_pos_lock
){+.+.}-{4:4}
, at: fdget_pos+0x247/0x320 fs/file.c:1232
 #1: 
ffff88805f1f9bd0
 (