Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309742
b: refs/heads/master
c: b1d4d9e
h: refs/heads/master
v: v3
  • Loading branch information
Konstantin Khlebnikov authored and Linus Torvalds committed Jun 1, 2012
1 parent 87d7776 commit 7d67407
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 052fb0d635df5d49dfc85687d94e1a87bf09378d
refs/heads/master: b1d4d9e0cbd0aecf40c3572e0c8f98de31b3b328
18 changes: 10 additions & 8 deletions trunk/fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,20 @@ static void smaps_pte_entry(pte_t ptent, unsigned long addr,
{
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = mss->vma;
struct page *page;
struct page *page = NULL;
int mapcount;

if (is_swap_pte(ptent)) {
mss->swap += ptent_size;
return;
}
if (pte_present(ptent)) {
page = vm_normal_page(vma, addr, ptent);
} else if (is_swap_pte(ptent)) {
swp_entry_t swpent = pte_to_swp_entry(ptent);

if (!pte_present(ptent))
return;
if (!non_swap_entry(swpent))
mss->swap += ptent_size;
else if (is_migration_entry(swpent))
page = migration_entry_to_page(swpent);
}

page = vm_normal_page(vma, addr, ptent);
if (!page)
return;

Expand Down

0 comments on commit 7d67407

Please sign in to comment.