Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eca35133 authored by Ben Collins's avatar Ben Collins Committed by Linus Torvalds
Browse files

[PATCH] Fix missing pfn variables caused by vm changes



I image this showed up because of "unused var..." when the changes
occured, because flush_cache_page() is a noop in most places.  This
showed up for me on parisc however, where flush_cache_page() is a real
function.

Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d70aa5e4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1345,7 +1345,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
		int reuse = can_share_swap_page(old_page);
		int reuse = can_share_swap_page(old_page);
		unlock_page(old_page);
		unlock_page(old_page);
		if (reuse) {
		if (reuse) {
			flush_cache_page(vma, address, pfn);
			flush_cache_page(vma, address, pte_pfn(orig_pte));
			entry = pte_mkyoung(orig_pte);
			entry = pte_mkyoung(orig_pte);
			entry = maybe_mkwrite(pte_mkdirty(entry), vma);
			entry = maybe_mkwrite(pte_mkdirty(entry), vma);
			ptep_set_access_flags(vma, address, page_table, entry, 1);
			ptep_set_access_flags(vma, address, page_table, entry, 1);
@@ -1389,7 +1389,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
			}
			}
		} else
		} else
			inc_mm_counter(mm, anon_rss);
			inc_mm_counter(mm, anon_rss);
		flush_cache_page(vma, address, pfn);
		flush_cache_page(vma, address, pte_pfn(orig_pte));
		entry = mk_pte(new_page, vma->vm_page_prot);
		entry = mk_pte(new_page, vma->vm_page_prot);
		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
		ptep_establish(vma, address, page_table, entry);
		ptep_establish(vma, address, page_table, entry);
+1 −1
Original line number Original line Diff line number Diff line
@@ -641,7 +641,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
			continue;
			continue;


		/* Nuke the page table entry. */
		/* Nuke the page table entry. */
		flush_cache_page(vma, address, pfn);
		flush_cache_page(vma, address, pte_pfn(*pte));
		pteval = ptep_clear_flush(vma, address, pte);
		pteval = ptep_clear_flush(vma, address, pte);


		/* If nonlinear, store the file page offset in the pte. */
		/* If nonlinear, store the file page offset in the pte. */