/* We account for memory if it's a private writeable mapping, not hugepages and VM_NORESERVE wasn't set.  */
static int accountable_mapping(struct file *file, unsigned int vm_flags)
/* We account for memory if it's a private writeable mapping, not hugepages and VM_NORESERVE wasn't set.  */
static int accountable_mapping(struct file *file, unsigned int vm_flags)
{
	if (file && is_file_hugepages(file))
		return 0;
	return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE;
}