Lines Matching refs:old_flags
3775 unsigned long new_flags, old_flags = READ_ONCE(folio->flags); in folio_update_gen() local
3782 if (!(old_flags & LRU_GEN_MASK)) { in folio_update_gen()
3784 new_flags = old_flags | BIT(PG_referenced); in folio_update_gen()
3788 new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_MASK | LRU_REFS_FLAGS); in folio_update_gen()
3790 } while (!try_cmpxchg(&folio->flags, &old_flags, new_flags)); in folio_update_gen()
3792 return ((old_flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1; in folio_update_gen()
3801 unsigned long new_flags, old_flags = READ_ONCE(folio->flags); in folio_inc_gen() local
3803 VM_WARN_ON_ONCE_FOLIO(!(old_flags & LRU_GEN_MASK), folio); in folio_inc_gen()
3806 new_gen = ((old_flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1; in folio_inc_gen()
3813 new_flags = old_flags & ~(LRU_GEN_MASK | LRU_REFS_MASK | LRU_REFS_FLAGS); in folio_inc_gen()
3818 } while (!try_cmpxchg(&folio->flags, &old_flags, new_flags)); in folio_inc_gen()