{
VM_BUG_ON(page_mapped(page));
VM_BUG_ON(page->mapping);
- if (PageSwapCache(page))
- return;
__mem_cgroup_uncharge_common(page, MEM_CGROUP_CHARGE_TYPE_CACHE, false);
}
if (!swapout) /* this was a swap cache but the swap is unused ! */
ctype = MEM_CGROUP_CHARGE_TYPE_DROP;
- if (PageSwapCache(page))
- return;
memcg = __mem_cgroup_uncharge_common(page, ctype, false);
/*
unused = oldpage;
}
anon = PageAnon(used);
- if (!PageSwapCache(unused))
- __mem_cgroup_uncharge_common(unused,
- anon ? MEM_CGROUP_CHARGE_TYPE_ANON
- : MEM_CGROUP_CHARGE_TYPE_CACHE,
- true);
+ __mem_cgroup_uncharge_common(unused,
+ anon ? MEM_CGROUP_CHARGE_TYPE_ANON
+ : MEM_CGROUP_CHARGE_TYPE_CACHE,
+ true);
css_put(&memcg->css);
/*
* We disallowed uncharge of pages under migration because mapcount