/* A call to try to shrink memory usage on charge failure at shmem's swapin. Calling hierarchical_reclaim is not enough because we should update last_oom_jiffies to prevent pagefault_out_of_memory from invoking global OOM. Moreover considering hierarchy, we should reclaim from the mem_over_limit, not from the memcg which this page would be charged to. try_charge_swapin does all of these works properly.  */
int mem_cgroup_shmem_charge_fallback(struct page *page, struct mm_struct *mm, gfp_t gfp_mask)
/* A call to try to shrink memory usage on charge failure at shmem's swapin. Calling hierarchical_reclaim is not enough because we should update last_oom_jiffies to prevent pagefault_out_of_memory from invoking global OOM. Moreover considering hierarchy, we should reclaim from the mem_over_limit, not from the memcg which this page would be charged to. try_charge_swapin does all of these works properly.  */
int mem_cgroup_shmem_charge_fallback(struct page *page, struct mm_struct *mm, gfp_t gfp_mask)
{
	struct mem_cgroup *mem = NULL;
	int ret;
	if (mem_cgroup_disabled())
		return 0;
	ret = mem_cgroup_try_charge_swapin(mm, page, gfp_mask, &mem);
	if (!ret)
		mem_cgroup_cancel_charge_swapin(mem);
	return ret;
}