[PATCH 6/9] pagemap: give -1's a name
From: Dave Hansen <hidden>
Date: 2007-08-22 23:18:13
-1 is a magic number in /proc/$pid/pagemap. It means that there was no pte present for a particular page. We're going to be refining that a bit shortly, so give this a real name for now. Signed-off-by: Dave Hansen <redacted> --- lxc-dave/fs/proc/task_mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN fs/proc/task_mmu.c~give_-1s_a_name fs/proc/task_mmu.c
--- lxc/fs/proc/task_mmu.c~give_-1s_a_name 2007-08-22 16:16:53.000000000 -0700
+++ lxc-dave/fs/proc/task_mmu.c 2007-08-22 16:16:53.000000000 -0700@@ -509,6 +509,7 @@ struct pagemapread { }; #define PM_ENTRY_BYTES sizeof(unsigned long) +#define PM_NOT_PRESENT ((unsigned long)-1) static int add_to_pagemap(unsigned long addr, unsigned long pfn, struct pagemapread *pm)
@@ -533,7 +534,7 @@ static int pagemap_pte_range(pmd_t *pmd, if (addr < pm->next) continue; if (!pte_present(*pte)) - err = add_to_pagemap(addr, -1, pm); + err = add_to_pagemap(addr, PM_NOT_PRESENT, pm); else err = add_to_pagemap(addr, pte_pfn(*pte), pm); if (err)
_ -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>