--- a/fs/dax.c~dax-fix-enomem-handling-in-grab_mapping_entry +++ a/fs/dax.c @@ -488,10 +488,11 @@ static void *grab_mapping_entry(struct x struct address_space *mapping, unsigned int order) { unsigned long index = xas->xa_index; - bool pmd_downgrade = false; /* splitting PMD entry into PTE entries? */ + bool pmd_downgrade; /* splitting PMD entry into PTE entries? */ void *entry; retry: + pmd_downgrade = false; xas_lock_irq(xas); entry = get_unlocked_entry(xas, order);