#include <linux/slab.h>
#include <linux/init.h>
#include <linux/rmap.h>
+#include <linux/vs_memory.h>
#include <asm/tlbflush.h>
* an exclusive swap page, do_wp_page will replace it by a copy
* page, and the user never get to see the data GUP was holding
* the original page for.
- *
- * This test is also useful for when swapoff (unuse_process) has
- * to drop page lock: its reference to the page stops existing
- * ptes from being unmapped, so swapoff can make progress.
*/
if (PageSwapCache(page) &&
page_count(page) != page->mapcount + 2) {
BUG_ON(pte_file(*pte));
}
- mm->rss--;
+ // mm->rss--;
+ vx_rsspages_dec(mm);
BUG_ON(!page->mapcount);
page->mapcount--;
page_cache_release(page);