inc_mm_counter(mm, rss); 
dec_mm_counter(mm, rss); 
static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma){	struct mm_struct *mm = vma->vm_mm;	unsigned long address;	pte_t *pte;	pte_t pteval;	int ret = SWAP_AGAIN;	if (!get_mm_counter(mm, rss))		goto out;	address = vma_address(page, vma);	if (address == -EFAULT)		goto out;	pte = page_check_address(page, mm, address);	if (IS_ERR(pte))		goto out;	/*	 * If the page is mlock()d, we cannot swap it out.	 * If it's recently referenced (perhaps page_referenced	 * skipped over this mm) then we should reactivate it.	 */	if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) ||			ptep_clear_flush_young(vma, address, pte)) {		ret = SWAP_FAIL;		goto out_unmap;	}	/*	 * Don't pull an anonymous page out from under get_user_pages.	 * GUP carefully breaks COW and raises page count (while holding	 * page_table_lock, as we have here) to make sure that the page	 * cannot be freed.  If we unmap that page here, a user write	 * access to the virtual address will bring back the page, but	 * its raised count will (ironically) be taken to mean it's not	 * an exclusive swap page, do_wp_page will replace it by a copy	 * page, and the user never get to see the data GUP was holding	 * the original page for.	 *	 * This test is also useful for when swapoff (unuse_process) has	 * to drop page lock: its reference to the page stops existing	 * ptes from being unmapped, so swapoff can make progress.	 */	if (PageSwapCache(page) &&	    page_count(page) != page_mapcount(page) + 2) {		ret = SWAP_FAIL;		goto out_unmap;	}	/* Nuke the page table entry. */	flush_cache_page(vma, address, page_to_pfn(page));	pteval = ptep_clear_flush(vma, address, pte);	/* Move the dirty bit to the physical page now the pte is gone. */	if (pte_dirty(pteval))		set_page_dirty(page);	if (PageAnon(page)) {		swp_entry_t entry = { .val = page->private };		/*		 * Store the swap location in the pte.		 * See handle_pte_fault() ...		 */		BUG_ON(!PageSwapCache(page));		swap_duplicate(entry);		if (list_empty(&mm->mmlist)) {			spin_lock(&mmlist_lock);			list_add(&mm->mmlist, &init_mm.mmlist);			spin_unlock(&mmlist_lock);		}		set_pte_at(mm, address, pte, swp_entry_to_pte(entry));		BUG_ON(pte_file(*pte));		dec_mm_counter(mm, anon_rss);	}	inc_mm_counter(mm, rss);	page_remove_rmap(page);	page_cache_release(page);out_unmap:	pte_unmap(pte);	spin_unlock(&mm->page_table_lock);out:	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/202d182a92c60416680e31baa697faa60b0882f5/rmap.c/buggy/mm/rmap.c