diff options
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 35787f907f12..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, | |||
204 | { | 204 | { |
205 | pte_t *pte, ptent; | 205 | pte_t *pte, ptent; |
206 | spinlock_t *ptl; | 206 | spinlock_t *ptl; |
207 | unsigned long pfn; | ||
208 | struct page *page; | 207 | struct page *page; |
209 | 208 | ||
210 | pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); | 209 | 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, | |||
214 | continue; | 213 | continue; |
215 | 214 | ||
216 | mss->resident += PAGE_SIZE; | 215 | mss->resident += PAGE_SIZE; |
217 | pfn = pte_pfn(ptent); | 216 | |
218 | if (!pfn_valid(pfn)) | 217 | page = vm_normal_page(vma, addr, ptent); |
218 | if (!page) | ||
219 | continue; | 219 | continue; |
220 | 220 | ||
221 | page = pfn_to_page(pfn); | 221 | if (page_mapcount(page) >= 2) { |
222 | if (page_count(page) >= 2) { | ||
223 | if (pte_dirty(ptent)) | 222 | if (pte_dirty(ptent)) |
224 | mss->shared_dirty += PAGE_SIZE; | 223 | mss->shared_dirty += PAGE_SIZE; |
225 | else | 224 | else |