__vm_stat_account(mm, oldflags, vma->vm_file, -nrpages); __vm_stat_account(mm, newflags, vma->vm_file, nrpages); 
vm_stat_account(mm, oldflags, vma->vm_file, -nrpages); vm_stat_account(mm, newflags, vma->vm_file, nrpages); 
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,	unsigned long start, unsigned long end, unsigned long newflags){	struct mm_struct *mm = vma->vm_mm;	unsigned long oldflags = vma->vm_flags;	long nrpages = (end - start) >> PAGE_SHIFT;	unsigned long charged = 0;	pgprot_t newprot;	pgoff_t pgoff;	int error;	if (newflags == oldflags) {		*pprev = vma;		return 0;	}	/*	 * If we make a private mapping writable we increase our commit;	 * but (without finer accounting) cannot reduce our commit if we	 * make it unwritable again.	 *	 * FIXME? We haven't defined a VM_NORESERVE flag, so mprotecting	 * a MAP_NORESERVE private mapping to writable will now reserve.	 */	if (newflags & VM_WRITE) {		if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED|VM_HUGETLB))) {			charged = nrpages;			if (security_vm_enough_memory(charged))				return -ENOMEM;			newflags |= VM_ACCOUNT;		}	}	newprot = protection_map[newflags & 0xf];	/*	 * First try to merge with previous and/or next vma.	 */	pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT);	*pprev = vma_merge(mm, *pprev, start, end, newflags,			vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma));	if (*pprev) {		vma = *pprev;		goto success;	}	*pprev = vma;	if (start != vma->vm_start) {		error = split_vma(mm, vma, start, 1);		if (error)			goto fail;	}	if (end != vma->vm_end) {		error = split_vma(mm, vma, end, 0);		if (error)			goto fail;	}success:	/*	 * vm_flags and vm_page_prot are protected by the mmap_sem	 * held in write mode.	 */	vma->vm_flags = newflags;	vma->vm_page_prot = newprot;	change_protection(vma, start, end, newprot);	__vm_stat_account(mm, oldflags, vma->vm_file, -nrpages);	__vm_stat_account(mm, newflags, vma->vm_file, nrpages);	return 0;fail:	vm_unacct_memory(charged);	return error;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ab50b8ed818016cfecd747d6d4bb9139986bc029/mprotect.c/clean/mm/mprotect.c