aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 439fc1f1c1c4..1dbca4e8cc16 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -224,7 +224,8 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
224 /* We don't show the stack guard page in /proc/maps */ 224 /* We don't show the stack guard page in /proc/maps */
225 start = vma->vm_start; 225 start = vma->vm_start;
226 if (vma->vm_flags & VM_GROWSDOWN) 226 if (vma->vm_flags & VM_GROWSDOWN)
227 start += PAGE_SIZE; 227 if (!vma_stack_continue(vma->vm_prev, vma->vm_start))
228 start += PAGE_SIZE;
228 229
229 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n", 230 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
230 start, 231 start,
@@ -362,13 +363,13 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
362 mss->referenced += PAGE_SIZE; 363 mss->referenced += PAGE_SIZE;
363 mapcount = page_mapcount(page); 364 mapcount = page_mapcount(page);
364 if (mapcount >= 2) { 365 if (mapcount >= 2) {
365 if (pte_dirty(ptent)) 366 if (pte_dirty(ptent) || PageDirty(page))
366 mss->shared_dirty += PAGE_SIZE; 367 mss->shared_dirty += PAGE_SIZE;
367 else 368 else
368 mss->shared_clean += PAGE_SIZE; 369 mss->shared_clean += PAGE_SIZE;
369 mss->pss += (PAGE_SIZE << PSS_SHIFT) / mapcount; 370 mss->pss += (PAGE_SIZE << PSS_SHIFT) / mapcount;
370 } else { 371 } else {
371 if (pte_dirty(ptent)) 372 if (pte_dirty(ptent) || PageDirty(page))
372 mss->private_dirty += PAGE_SIZE; 373 mss->private_dirty += PAGE_SIZE;
373 else 374 else
374 mss->private_clean += PAGE_SIZE; 375 mss->private_clean += PAGE_SIZE;