#include <linux/rmap.h>
#include <linux/module.h>
#include <linux/syscalls.h>
+#include <linux/vs_base.h>
#include <linux/vs_memory.h>
#include <asm/mmu_context.h>
err = -ENOMEM;
if (page_mapcount(page) > INT_MAX/2)
goto unlock;
+ if (!vx_rsspages_avail(mm, 1))
+ goto unlock;
}
- err = -ENOMEM;
- if (!vx_rsspages_avail(mm, 1))
- goto unlock;
if (pte_none(*pte) || !zap_pte(mm, vma, addr, pte))
inc_mm_counter(mm, file_rss);