BUG: MAX_LOCK_DEPTH too low!
turning off the locking correctness validator.
depth: 48  max: 48!
48 locks held by syz.2.830/12202:
 #0: ffff0000e7f7e420 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:409
 #1: ffff0000ddb8c3f8 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline]
 #1: ffff0000ddb8c3f8 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: do_truncate+0x1ac/0x28c fs/open.c:63
 #2: ffff0000e7b00ab8 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x134/0x274 fs/bcachefs/io_misc.c:290
 #3: ffff0000e7b042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire+0x18/0x54 include/linux/srcu.h:115
 #4: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #5: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #5: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #6: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #6: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #7: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #7: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #8: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #8: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #9: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #9: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #10: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #10: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #11: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #11: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #12: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #12: ffff0000cb2ec070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #13: ffff0000f540eb30 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #14: ffff0000f540fb50 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #15: ffff0000f540f748 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #16: ffff0000f540ef38 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #17: ffff0000f540e880 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #18: ffff0000f540f090 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #19: ffff0000f540f8a0 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #20: ffff0000f540e320 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #21: ffff0000da9b4870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #22: ffff0000f032a870 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #23: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #24: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #25: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #26: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #27: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #28: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #29: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #29: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #30: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #30: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #31: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #31: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #32: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #32: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #33: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #33: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #34: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline]
 #34: ffff0000d0062070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6a0/0xa94 fs/bcachefs/btree_locking.c:509
 #35: ffff0000d1ae3070 (&dev->mutex){....}-{3:3}, at: six_relock_type+0x24/0x5c fs/bcachefs/six.h:288
 #36: ffff0000e7b26750 (&c->gc_lock){.+.+}-{3:3}, at: bch2_btree_update_start+0x590/0x15a0 fs/bcachefs/btree_update_interior.c:1195
 #37: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline]
 #37: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline]
 #37: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1b8/0x508 fs/bcachefs/btree_iter.c:1249
 #38: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline]
 #38: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline]
 #38: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1b8/0x508 fs/bcachefs/btree_iter.c:1249
 #39: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline]
 #39: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline]
 #39: ffff0000d405e870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1b8/0x508 fs/bcachefs/btree_iter.c:1249
 #40: ffff0000f540e478 (&dev->mutex){....}-{3:3}, at: six_trylock_intent+0x18/0x48 fs/bcachefs/six.h:366
 #41: ffff0000d0061070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_nopath_nofail+0x28/0x164 fs/bcachefs/btree_locking.h:227
 #42: ffff0000d0061070 (&dev->mutex){....}-{3:3}, at: btree_split+0x1618/0x4c84 fs/bcachefs/btree_update_interior.c:1674
 #43: ffff80008f4b7be0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:328
 #44: ffff0001b3d34bb8 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x854/0x12ac
 #45: ffff0000c19d27f8 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline]
 #45: ffff0000c19d27f8 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0xf2c kernel/sched/core.c:4262
 #46: ffff0001b3d35018 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:559 [inline]
 #46: ffff0001b3d35018 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock kernel/sched/sched.h:1406 [inline]
 #46: ffff0001b3d35018 (&rq->__lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1702 [inline]
 #46: ffff0001b3d35018 (&rq->__lock){-.-.}-{2:2}, at: ttwu_queue kernel/sched/core.c:4055 [inline]
 #46: ffff0001b3d35018 (&rq->__lock){-.-.}-{2:2}, at: try_to_wake_up+0x4e4/0xf2c kernel/sched/core.c:4378
 #47: fffffdffbf747188 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: update_rq_clock_task kernel/sched/core.c:726 [inline]
 #47: fffffdffbf747188 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: update_rq_clock+0x1b8/0x634 kernel/sched/core.c:770
INFO: lockdep is turned off.
CPU: 0 PID: 12202 Comm: syz.2.830 Not tainted 6.10.0-rc7-syzkaller-gc912bf709078 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114
 dump_stack+0x1c/0x28 lib/dump_stack.c:123
 __lock_acquire+0x1d5c/0x763c kernel/locking/lockdep.c:5159
 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5754
 do_write_seqcount_begin_nested include/linux/seqlock.h:469 [inline]
 do_write_seqcount_begin include/linux/seqlock.h:495 [inline]
 psi_account_irqtime+0x310/0x7cc kernel/sched/psi.c:1016
 update_rq_clock_task kernel/sched/core.c:726 [inline]
 update_rq_clock+0x1b8/0x634 kernel/sched/core.c:770
 ttwu_queue kernel/sched/core.c:4056 [inline]
 try_to_wake_up+0x514/0xf2c kernel/sched/core.c:4378
 wake_up_process+0x18/0x24 kernel/sched/core.c:4510
 kick_pool+0x3f0/0x59c kernel/workqueue.c:1280
 __queue_work+0xdcc/0x12ac kernel/workqueue.c:2361
 queue_work_on+0xe0/0x1a0 kernel/workqueue.c:2411
 queue_work include/linux/workqueue.h:621 [inline]
 __bch2_btree_node_write+0x27e8/0x34a8 fs/bcachefs/btree_io.c:2232
 bch2_btree_node_write+0x6c/0x1a0 fs/bcachefs/btree_io.c:2307
 btree_split+0x36c8/0x4c84 fs/bcachefs/btree_update_interior.c:1706
 bch2_btree_split_leaf+0x148/0x734 fs/bcachefs/btree_update_interior.c:1857
 bch2_trans_commit_error+0x2a4/0x1068 fs/bcachefs/btree_trans_commit.c:918
 __bch2_trans_commit+0x35e4/0x592c fs/bcachefs/btree_trans_commit.c:1138
 bch2_trans_commit fs/bcachefs/btree_update.h:170 [inline]
 bch2_extent_update+0x3d0/0x9b4 fs/bcachefs/io_write.c:326
 bch2_fpunch_at+0x640/0xd98 fs/bcachefs/io_misc.c:184
 __bch2_resume_logged_op_truncate+0x404/0x620 fs/bcachefs/io_misc.c:260
 bch2_truncate+0x198/0x274 fs/bcachefs/io_misc.c:291
 bchfs_truncate+0x668/0xa74 fs/bcachefs/fs-io.c:476
 bch2_setattr+0x198/0x230 fs/bcachefs/fs.c:926
 notify_change+0x9d4/0xc84 fs/attr.c:497
 do_truncate+0x1c0/0x28c fs/open.c:65
 handle_truncate fs/namei.c:3355 [inline]
 do_open fs/namei.c:3705 [inline]
 path_openat+0x2428/0x2ae8 fs/namei.c:3860
 do_filp_open+0x1bc/0x3cc fs/namei.c:3887
 do_sys_openat2+0x124/0x1b8 fs/open.c:1413
 do_sys_open fs/open.c:1428 [inline]
 __do_sys_openat fs/open.c:1444 [inline]
 __se_sys_openat fs/open.c:1439 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1439
 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598