------------[ cut here ]------------ btree trans held srcu lock (delaying memory reclaim) for 13 seconds WARNING: CPU: 1 PID: 9264 at fs/bcachefs/btree_iter.c:2998 check_srcu_held_too_long fs/bcachefs/btree_iter.c:2996 [inline] WARNING: CPU: 1 PID: 9264 at fs/bcachefs/btree_iter.c:2998 bch2_trans_put+0xd7a/0xfb0 fs/bcachefs/btree_iter.c:3239 Modules linked in: CPU: 1 PID: 9264 Comm: syz.3.952 Not tainted 6.10.0-syzkaller #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+0xd7a/0xfb0 fs/bcachefs/btree_iter.c:3239 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 e0 bc 11 8c 48 89 d6 e8 f7 6d 44 fd 90 <0f> 0b 90 90 e9 14 f8 ff ff e8 98 41 82 fd 90 0f 0b 90 e9 57 f8 ff RSP: 0018:ffffc90004436768 EFLAGS: 00010246 RAX: 162f2695e0db6a00 RBX: 0000000000000151 RCX: 0000000000040000 RDX: ffffc9001cc0f000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: dffffc0000000000 R08: ffffffff81585882 R09: 1ffff110172a519a R10: dffffc0000000000 R11: ffffed10172a519b R12: 1ffff1100c10a008 R13: 1ffff1100c10a00e R14: ffff888060850070 R15: ffff888060850041 FS: 00007feb201c46c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffe8 CR3: 000000005f258000 CR4: 0000000000350ef0 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:270 [inline] closure_call include/linux/closure.h:432 [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+0x35b/0x870 mm/page-writeback.c:2656 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 iter_file_splice_write+0xbd9/0x14e0 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x120/0x220 fs/splice.c:1164 splice_direct_to_actor+0x590/0xc90 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0x28c/0x3e0 fs/splice.c:1233 vfs_copy_file_range+0xd37/0x1530 fs/read_write.c:1558 __do_sys_copy_file_range fs/read_write.c:1612 [inline] __se_sys_copy_file_range+0x3f2/0x5d0 fs/read_write.c:1575 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:0x7feb1f375bd9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007feb201c4048 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007feb1f503f60 RCX: 00007feb1f375bd9 RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007feb1f3e4e60 R08: ffffffffa003e459 R09: 0700000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007feb1f503f60 R15: 00007ffc47c7cb68