page_remove_rmap(old_page); if (!PageAnon(old_page)) { 
if (old_page) { page_remove_rmap(old_page); if (!PageAnon(old_page)) { dec_mm_counter(mm, file_rss); inc_mm_counter(mm, anon_rss); } } else 
static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,		unsigned long address, pte_t *page_table, pmd_t *pmd,		spinlock_t *ptl, pte_t orig_pte){	struct page *old_page, *new_page;	unsigned long pfn = pte_pfn(orig_pte);	pte_t entry;	int ret = VM_FAULT_MINOR;	BUG_ON(vma->vm_flags & VM_UNPAGED);	if (unlikely(!pfn_valid(pfn))) {		/*		 * Page table corrupted: show pte and kill process.		 */		print_bad_pte(vma, orig_pte, address);		ret = VM_FAULT_OOM;		goto unlock;	}	old_page = pfn_to_page(pfn);	if (PageAnon(old_page) && !TestSetPageLocked(old_page)) {		int reuse = can_share_swap_page(old_page);		unlock_page(old_page);		if (reuse) {			flush_cache_page(vma, address, pfn);			entry = pte_mkyoung(orig_pte);			entry = maybe_mkwrite(pte_mkdirty(entry), vma);			ptep_set_access_flags(vma, address, page_table, entry, 1);			update_mmu_cache(vma, address, entry);			lazy_mmu_prot_update(entry);			ret |= VM_FAULT_WRITE;			goto unlock;		}	}	/*	 * Ok, we need to copy. Oh, well..	 */	page_cache_get(old_page);	pte_unmap_unlock(page_table, ptl);	if (unlikely(anon_vma_prepare(vma)))		goto oom;	if (old_page == ZERO_PAGE(address)) {		new_page = alloc_zeroed_user_highpage(vma, address);		if (!new_page)			goto oom;	} else {		new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);		if (!new_page)			goto oom;		copy_user_highpage(new_page, old_page, address);	}	/*	 * Re-check the pte - we dropped the lock	 */	page_table = pte_offset_map_lock(mm, pmd, address, &ptl);	if (likely(pte_same(*page_table, orig_pte))) {		page_remove_rmap(old_page);		if (!PageAnon(old_page)) {			inc_mm_counter(mm, anon_rss);			dec_mm_counter(mm, file_rss);		}		flush_cache_page(vma, address, pfn);		entry = mk_pte(new_page, vma->vm_page_prot);		entry = maybe_mkwrite(pte_mkdirty(entry), vma);		ptep_establish(vma, address, page_table, entry);		update_mmu_cache(vma, address, entry);		lazy_mmu_prot_update(entry);		lru_cache_add_active(new_page);		page_add_anon_rmap(new_page, vma, address);		/* Free the old page.. */		new_page = old_page;		ret |= VM_FAULT_WRITE;	}	page_cache_release(new_page);	page_cache_release(old_page);unlock:	pte_unmap_unlock(page_table, ptl);	return ret;oom:	page_cache_release(old_page);	return VM_FAULT_OOM;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/920fc356f58d0e455bdfa53451f1c58eb211a846/memory.c/clean/mm/memory.c