INFO: task syz.2.89:6547 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.89        state:D stack:15304 pid:6547  tgid:6546  ppid:5850   task_flags:0x400140 flags:0x00004006
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 io_schedule+0x80/0xd0
 folio_wait_bit_common+0x6b0/0xb90
 invalidate_inode_pages2_range+0x557/0xa80
 bch2_write_invalidate_inode_pages_range+0xc5/0x110
 bch2_direct_write+0x2a62/0x2ce0
 bch2_write_iter+0x18f/0x2b90
 iter_file_splice_write+0x975/0x10e0
 direct_splice_actor+0x101/0x160
 splice_direct_to_actor+0x5a8/0xcc0
 do_splice_direct+0x181/0x270
 do_sendfile+0x4da/0x7e0
 __se_sys_sendfile64+0x13e/0x190
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f217eb8ebe9
RSP: 002b:00007f217f994038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f217edc5fa0 RCX: 00007f217eb8ebe9
RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000006
RBP: 00007f217ec11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020fffe82 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f217edc6038 R14: 00007f217edc5fa0 R15: 00007ffc9c6eec58
 </TASK>
INFO: task syz.2.89:6562 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.89        state:D stack:18152 pid:6562  tgid:6546  ppid:5850   task_flags:0x440140 flags:0x00004006
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 __bch2_two_state_lock+0x1ea/0x370
 bch2_readahead+0x94f/0x1100
 read_pages+0x17a/0x580
 page_cache_ra_order+0x8ca/0xd40
 filemap_get_pages+0x43c/0x1ea0
 filemap_splice_read+0x581/0xc60
 splice_direct_to_actor+0x4a9/0xcc0
 do_splice_direct+0x181/0x270
 do_sendfile+0x4da/0x7e0
 __se_sys_sendfile64+0x13e/0x190
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f217eb8ebe9
RSP: 002b:00007f217f973038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f217edc6090 RCX: 00007f217eb8ebe9
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 0000000000000009
RBP: 00007f217ec11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000e3aa6ea R11: 0000000000000246 R12: 0000000000000000
R13: 00007f217edc6128 R14: 00007f217edc6090 R15: 00007ffc9c6eec58
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/34:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
2 locks held by getty/5671:
 #0: ffff88810ef560a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029062f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
6 locks held by kworker/u8:5/5893:
 #0: ffff88801b2f7148 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000477fbc0 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffffffff8f52b9f0 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf7/0x800
 #3: ffffffff8f538888 (rtnl_mutex){+.+.}-{4:4}, at: wg_netns_pre_exit+0x1c/0x1d0
 #4: ffff8881097f94e8 (&wg->device_update_lock){+.+.}-{4:4}, at: wg_netns_pre_exit+0xb0/0x1d0
 #5: ffffffff8e13f978 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x2f6/0x730
1 lock held by syz.2.89/6547:
 #0: ffff88802bd32428 (sb_writers#15){.+.+}-{0:0}, at: direct_splice_actor+0x49/0x160
1 lock held by syz.2.89/6562:
 #0: ffff88811cd2a148 (mapping.invalidate_lock#6){.+.+}-{4:4}, at: page_cache_ra_order+0x318/0xd40
3 locks held by syz-executor/8752:
 #0: ffff8881031440e0 (&type->s_umount_key#59){++++}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888044700278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffffffff8e13f978 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x3b9/0x730
3 locks held by kworker/0:10/9018:

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 34 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xf93/0xfe0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 6026 Comm: kworker/u13:2 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: bcachefs bch2_write_point_do_index_updates
RIP: 0010:bch2_bkey_durability+0x3c5/0x7a0
Code: 4c 89 ff e8 7d 5c e6 fd 4d 8b 37 31 ff 4c 89 f6 e8 30 f3 82 fd 4d 85 f6 0f 84 18 02 00 00 f3 49 0f bc ee bf 07 00 00 00 89 ee <e8> 76 f2 82 fd 83 fd 07 0f 83 90 03 00 00 f3 4d 0f bc f6 bf 06 00
RSP: 0018:ffffc90006f772c0 EFLAGS: 00000202
RAX: ffffffff843cbd40 RBX: 0000000000000001 RCX: ffff888107c0d640
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000007
RBP: 0000000000000001 R08: ffffc90006f7730f R09: 0000000000000000
R10: ffffc90006f772f8 R11: fffff52000deee62 R12: dffffc0000000000
R13: ffff888112ea8090 R14: 000000003000fe1e R15: ffff888112ea8080
FS:  0000000000000000(0000) GS:ffff8881a3c1b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b318fcff8 CR3: 000000002a310000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 __bch2_data_update_index_update+0x270c/0x4f70
 bch2_data_update_index_update+0x65/0xa0
 __bch2_write_index+0x1004/0x1930
 bch2_write_point_do_index_updates+0x43f/0x570
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
