INFO: task kworker/u9:3:65 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u9:3    state:D stack:22600 pid:65    tgid:65    ppid:2      task_flags:0x4208060 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:3)
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x7e6/0x1350
 jfs_commit_inode+0x1ca/0x530
 jfs_write_inode+0x145/0x220
 __writeback_single_inode+0x6f1/0xff0
 writeback_sb_inodes+0x6c7/0x1010
 __writeback_inodes_wb+0x111/0x240
 wb_writeback+0x44f/0xaf0
 wb_workfn+0xaef/0xef0
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </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
4 locks held by kworker/u9:3/65:
 #0: ffff888100682148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000173fbc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88811a7420e0 (&type->s_umount_key#83){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0
 #3: ffff888111a3c250 (&jfs_ip->commit_mutex){+.+.}-{4:4}, at: jfs_commit_inode+0x1ca/0x530
2 locks held by getty/5674:
 #0: ffff88802146c0a0 (&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
4 locks held by syz.3.42/6236:
2 locks held by syz.9.386/9055:
5 locks held by syz.5.384/9086:
 #0: ffff88812cf04398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #1: ffff888121a441b0 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #2: ffff88812cf4b148 (journal res){.+.+}-{0:0}, at: bch2_journal_res_get+0x6a9/0x8f0
 #3: ffff88812cf049d8 (&c->mark_lock){++++}-{0:0}, at: bch2_accounting_mem_insert+0x438/0xad0
 #4: ffffffff8e13f978 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x3b9/0x730
2 locks held by syz.8.387/9100:

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

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: 9100 Comm: syz.8.387 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
RIP: 0010:__lock_acquire+0x50c/0xd20
Code: 49 83 c7 28 41 89 c4 48 39 cb 0f 8d d6 00 00 00 48 83 fb 31 0f 83 92 00 00 00 41 8b 07 25 ff 1f 00 00 48 0f a3 05 24 b0 0a 12 <73> 10 48 69 c0 c8 00 00 00 48 8d 88 10 13 49 93 eb 40 83 3d 8b 3f
RSP: 0018:ffffc90003b2ef08 EFLAGS: 00000003
RAX: 0000000000000602 RBX: 0000000000000001 RCX: 0000000000000002
RDX: 0000000000000003 RSI: 0000000000000000 RDI: ffff888021215640
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8172c195
R10: ffffc90003b2f158 R11: ffffffff81ac3820 R12: 00000000ffffff05
R13: 0000000000000001 R14: ffff888021216180 R15: ffff888021216178
FS:  00007f7aba41d6c0(0000) GS:ffff8881a3c1b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7ab05bd000 CR3: 000000003b048000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 lock_acquire+0x120/0x360
 unwind_next_frame+0xc2/0x2390
 arch_stack_walk+0x11c/0x150
 stack_trace_save+0x9c/0xe0
 save_stack+0xf5/0x1f0
 __set_page_owner+0x8d/0x4a0
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 folio_alloc_mpol_noprof+0x39/0x70
 shmem_alloc_and_add_folio+0x447/0xf60
 shmem_get_folio_gfp+0x59d/0x1660
 shmem_write_begin+0xf7/0x2b0
 generic_perform_write+0x2c5/0x900
 shmem_file_write_iter+0xf8/0x120
 vfs_write+0x5c9/0xb30
 ksys_write+0x145/0x250
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7ab958d69f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48
RSP: 002b:00007f7aba41cdf0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000013bd7ef RCX: 00007f7ab958d69f
RDX: 00000000013bd7ef RSI: 00007f7aaf200000 RDI: 0000000000000006
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000005535
R10: 000020000000ac02 R11: 0000000000000293 R12: 0000000000000006
R13: 00007f7aba41cef0 R14: 00007f7aba41ceb0 R15: 00007f7aaf200000
 </TASK>
