#include <asm/machdep.h>
#include <asm/cputable.h>
#include <asm/tlb.h>
-#include <asm/rmap.h>
#include <linux/sysctl.h>
}
page = pmd_page(*pmd);
pmd_clear(pmd);
- pgtable_remove_rmap(page);
+ dec_page_state(nr_page_table_pages);
pte_free_tlb(tlb, page);
}
tlb_finish_mmu(tlb, start, end);
goto out;
}
ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
- unlock_page(page);
- if (ret) {
+ if (! ret) {
+ unlock_page(page);
+ } else {
hugetlb_put_quota(mapping);
free_huge_page(page);
goto out;