BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! turning off the locking correctness validator. CPU: 0 PID: 6494 Comm: kworker/u4:11 Not tainted 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: btrfs-qgroup-rescan btrfs_work_helper 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 include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] btrfs_block_rsv_reserved fs/btrfs/block-rsv.h:125 [inline] need_preemptive_reclaim+0x44/0x604 fs/btrfs/space-info.c:850 __reserve_bytes+0xd0c/0x13f8 fs/btrfs/space-info.c:1693 btrfs_reserve_metadata_bytes+0x64/0x15c fs/btrfs/space-info.c:1730 btrfs_use_block_rsv+0x46c/0x6d8 fs/btrfs/block-rsv.c:548 btrfs_alloc_tree_block+0x174/0x1478 fs/btrfs/extent-tree.c:5013 __btrfs_cow_block+0x3f4/0x1824 fs/btrfs/ctree.c:441 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 commit_cowonly_roots+0x574/0x740 fs/btrfs/transaction.c:1325 btrfs_commit_transaction+0x1228/0x2cd4 fs/btrfs/transaction.c:2425 btrfs_qgroup_rescan_worker+0x15a8/0x161c fs/btrfs/qgroup.c:3410 btrfs_work_helper+0x32c/0xdb4 fs/btrfs/async-thread.c:280 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)