BTRFS info (device loop5): delayed_block_rsv: size 0 reserved 0 BTRFS info (device loop5): delayed_refs_rsv: size 0 reserved 0 BTRFS info (device loop5): relocating block group 1048576 flags system BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! turning off the locking correctness validator. CPU: 1 PID: 6739 Comm: syz.5.431 Not tainted 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 lookup_chain_cache_add kernel/locking/lockdep.c:3772 [inline] validate_chain kernel/locking/lockdep.c:3793 [inline] __lock_acquire+0x1b88/0x7680 kernel/locking/lockdep.c:5049 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x6c/0xb4 kernel/locking/spinlock.c:162 percpu_counter_add_batch+0x160/0x2e4 lib/percpu_counter.c:90 wb_stat_mod include/linux/backing-dev.h:68 [inline] folio_account_dirtied mm/page-writeback.c:2593 [inline] __folio_mark_dirty+0x560/0xd04 mm/page-writeback.c:2638 filemap_dirty_folio+0xe4/0x1a8 mm/page-writeback.c:2672 folio_mark_dirty+0x118/0x198 mm/page-writeback.c:2771 set_page_dirty+0x58/0x78 mm/folio-compat.c:62 btrfs_page_set_dirty+0x80/0x19c fs/btrfs/subpage.c:699 set_extent_buffer_dirty+0x34c/0x4b0 fs/btrfs/extent_io.c:4891 btrfs_mark_buffer_dirty+0x154/0x220 fs/btrfs/disk-io.c:4813 __btrfs_cow_block+0xd0c/0x1824 fs/btrfs/ctree.c:524 btrfs_cow_block+0x314/0xaa4 fs/btrfs/ctree.c:613 btrfs_search_slot+0xb7c/0x2948 btrfs_search_prev_slot fs/btrfs/free-space-tree.c:135 [inline] remove_free_space_extent fs/btrfs/free-space-tree.c:727 [inline] __remove_from_free_space_tree fs/btrfs/free-space-tree.c:822 [inline] remove_from_free_space_tree+0x488/0xdf8 fs/btrfs/free-space-tree.c:851 alloc_reserved_extent+0x5c/0x438 fs/btrfs/extent-tree.c:4677 alloc_reserved_tree_block fs/btrfs/extent-tree.c:4828 [inline] run_delayed_tree_ref fs/btrfs/extent-tree.c:1676 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1705 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1954 [inline] __btrfs_run_delayed_refs+0x1310/0x3a90 fs/btrfs/extent-tree.c:2017 btrfs_run_delayed_refs+0x13c/0x4c0 fs/btrfs/extent-tree.c:2148 btrfs_commit_transaction+0x308/0x2cd4 fs/btrfs/transaction.c:2172 prepare_to_merge+0x694/0x1184 fs/btrfs/relocation.c:1965 relocate_block_group+0x898/0xac4 fs/btrfs/relocation.c:3755 btrfs_relocate_block_group+0x5a8/0x98c fs/btrfs/relocation.c:4094 btrfs_relocate_chunk+0x118/0x368 fs/btrfs/volumes.c:3312 __btrfs_balance+0x1468/0x1dc8 fs/btrfs/volumes.c:4060 btrfs_balance+0xa38/0xe40 fs/btrfs/volumes.c:4436 btrfs_ioctl_balance+0x3e4/0x778 fs/btrfs/ioctl.c:4511 btrfs_ioctl+0x72c/0xb08 fs/btrfs/ioctl.c:5550 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 BTRFS info (device loop5): balance: ended with status: 0