On Thu 10-04-25 10:30:28, Davidlohr Bueso wrote: > On Thu, 10 Apr 2025, Jan Kara wrote: > > > > @@ -851,6 +851,8 @@ static int __buffer_migrate_folio(struct address_space *mapping, > > > bool busy; > > > bool invalidated = false; > > > > > > + VM_WARN_ON_ONCE(test_and_set_bit_lock(BH_Migrate, > > > + &head->b_state)); > > > > Careful here. This breaks the logic with !CONFIG_DEBUG_VM. > > Ok, I guess just a WARN_ON_ONCE() here then. Or just: bool migrating = test_and_set_bit_lock(BH_Migrate, &head->b_state); VM_WARN_ON_ONCE(migrating); Frankly, I find statements with side-effects in WARN_ON / BUG_ON statements rather confusing practice... Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR