------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 29 seconds WARNING: CPU: 1 PID: 25 at fs/bcachefs/btree_iter.c:3017 check_srcu_held_too_long fs/bcachefs/btree_iter.c:3015 [inline] WARNING: CPU: 1 PID: 25 at fs/bcachefs/btree_iter.c:3017 bch2_trans_srcu_unlock+0x513/0x5b0 fs/bcachefs/btree_iter.c:3031 Modules linked in: CPU: 1 UID: 0 PID: 25 Comm: kworker/1:0 Not tainted 6.12.0-rc4-syzkaller-00047-gc2ee9f594da8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: bcachefs_write_ref bch2_delete_dead_snapshots_work (bcachefs-delete-dead-snapshots/) RIP: 0010:check_srcu_held_too_long fs/bcachefs/btree_iter.c:3015 [inline] RIP: 0010:bch2_trans_srcu_unlock+0x513/0x5b0 fs/bcachefs/btree_iter.c:3031 Code: 2b 3e 49 c1 ef 02 48 b9 c3 f5 28 5c 8f c2 f5 28 4c 89 f8 48 f7 e1 48 c1 ea 02 48 c7 c7 a0 66 52 8c 48 89 d6 e8 de 83 3a fd 90 <0f> 0b 90 90 49 89 df e9 b1 fe ff ff 44 89 e9 80 e1 07 fe c1 38 c1 RSP: 0018:ffffc900001f6f60 EFLAGS: 00010246 RAX: cc192e47959a9b00 RBX: 1ffff1100b7a3808 RCX: ffff88801d681e00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 00000000ffffd107 R08: ffffffff8155d402 R09: 1ffff110170e519a R10: dffffc0000000000 R11: ffffed10170e519b R12: 1ffff1100b7a380e R13: ffff88805bd1c042 R14: ffff88805bd1c070 R15: 00000000000002dc FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2f0171 CR3: 000000000e734000 CR4: 0000000000350ef0 Call Trace: bch2_trans_begin+0x178c/0x1c00 fs/bcachefs/btree_iter.c:3108 bch2_delete_dead_snapshots+0x170e/0x5ae0 fs/bcachefs/snapshot.c:1643 bch2_delete_dead_snapshots_work+0x34/0x40 fs/bcachefs/snapshot.c:1718 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244