/* Determine whether the allocation of a new virtual mapping by the current task is permitted, returning 0 if permission is granted, -ve if not.  */
int cap_vm_enough_memory(struct mm_struct *mm, long pages)
/* Determine whether the allocation of a new virtual mapping by the current task is permitted, returning 0 if permission is granted, -ve if not.  */
int cap_vm_enough_memory(struct mm_struct *mm, long pages)
{
	int cap_sys_admin = 0;
	if (cap_capable(current, current_cred(), CAP_SYS_ADMIN,
			SECURITY_CAP_NOAUDIT) == 0)
		cap_sys_admin = 1;
	return __vm_enough_memory(mm, pages, cap_sys_admin);
}