diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-09 04:32:05 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-09 04:32:05 +0100 |
commit | 516450179454de9e689e0a53ed8f34b896e8651c (patch) | |
tree | 78eae2f77de6cd39b18c7393fc5854456fc3fb1f /fs/proc/task_mmu.c | |
parent | Merge ../powerpc-merge (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge (diff) | |
download | linux-516450179454de9e689e0a53ed8f34b896e8651c.tar.xz linux-516450179454de9e689e0a53ed8f34b896e8651c.zip |
Merge ../linux-2.6
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 0eaad41f4658..91b7c15ab373 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -204,7 +204,6 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd, { pte_t *pte, ptent; spinlock_t *ptl; - unsigned long pfn; struct page *page; pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); @@ -214,12 +213,12 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd, continue; mss->resident += PAGE_SIZE; - pfn = pte_pfn(ptent); - if (!pfn_valid(pfn)) + + page = vm_normal_page(vma, addr, ptent); + if (!page) continue; - page = pfn_to_page(pfn); - if (page_count(page) >= 2) { + if (page_mapcount(page) >= 2) { if (pte_dirty(ptent)) mss->shared_dirty += PAGE_SIZE; else @@ -289,7 +288,7 @@ static int show_smap(struct seq_file *m, void *v) struct mem_size_stats mss; memset(&mss, 0, sizeof mss); - if (vma->vm_mm) + if (vma->vm_mm && !is_vm_hugetlb_page(vma)) smaps_pgd_range(vma, vma->vm_start, vma->vm_end, &mss); return show_map_internal(m, v, &mss); } |