------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 20 seconds WARNING: CPU: 1 PID: 6366 at fs/bcachefs/btree_iter.c:2998 check_srcu_held_too_long fs/bcachefs/btree_iter.c:2996 [inline] WARNING: CPU: 1 PID: 6366 at fs/bcachefs/btree_iter.c:2998 bch2_trans_put+0xdd0/0x1030 fs/bcachefs/btree_iter.c:3243 Modules linked in: CPU: 1 PID: 6366 Comm: syz-executor.0 Not tainted 6.10.0-rc4-syzkaller-00148-g50736169ecc8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 RIP: 0010:check_srcu_held_too_long fs/bcachefs/btree_iter.c:2996 [inline] RIP: 0010:bch2_trans_put+0xdd0/0x1030 fs/bcachefs/btree_iter.c:3243 Code: 2b 1e 48 c1 eb 02 48 b9 c3 f5 28 5c 8f c2 f5 28 48 89 d8 48 f7 e1 48 c1 ea 02 48 c7 c7 60 6e 11 8c 48 89 d6 e8 41 02 48 fd 90 <0f> 0b 90 90 e9 e2 f7 ff ff e8 22 d2 85 fd 90 0f 0b 90 e9 25 f8 ff RSP: 0018:ffffc900044c6d28 EFLAGS: 00010246 RAX: d164e36ad44c2400 RBX: 0000000000000205 RCX: 0000000000040000 RDX: ffffc90012b79000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: dffffc0000000000 R08: ffffffff81585742 R09: fffffbfff1c39994 R10: dffffc0000000000 R11: fffffbfff1c39994 R12: 1ffff1100bd6a808 R13: 1ffff1100bd6a80e R14: ffff88805eb54070 R15: ffff88805eb54041 FS: 00007fb448ab36c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32228000 CR3: 0000000077542000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __bch2_write+0x5223/0x5c40 fs/bcachefs/io_write.c:1438 bch2_write+0x947/0x1670 fs/bcachefs/io_write.c:1634 closure_queue include/linux/closure.h:269 [inline] closure_call include/linux/closure.h:402 [inline] bch2_writepage_do_io fs/bcachefs/fs-io-buffered.c:460 [inline] bch2_writepages+0x27d/0x380 fs/bcachefs/fs-io-buffered.c:652 do_writepages+0x359/0x870 mm/page-writeback.c:2634 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397 __filemap_fdatawrite_range mm/filemap.c:430 [inline] file_write_and_wait_range+0x1aa/0x290 mm/filemap.c:788 bch2_fsync+0x93/0x130 fs/bcachefs/fs-io.c:197 generic_write_sync include/linux/fs.h:2794 [inline] bch2_buffered_write fs/bcachefs/fs-io-buffered.c:1128 [inline] bch2_write_iter+0x262e/0x2840 fs/bcachefs/fs-io-buffered.c:1136 new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa72/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb447c7cf29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb448ab30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fb447db4050 RCX: 00007fb447c7cf29 RDX: 00000000fffffdef RSI: 00000000200000c0 RDI: 0000000000000007 RBP: 00007fb447cec074 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fb447db4050 R15: 00007fffdf9d2538