From ff2e2842b7662322068e5602afc82d5ad2ee827f Mon Sep 17 00:00:00 2001 From: Thomas Tuttle Date: Thu, 5 Jun 2008 09:39:12 -0400 Subject: [PATCH] Changed kpagecount to return the map count, not the reference count, of a page. This ensures that, if you read the pagemap of every process, and tally the number of references to a page, it matches what is in kpagecount. --- fs/proc/proc_misc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 32dc14c..5a16090 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -726,7 +726,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, if (!ppage) pcount = 0; else - pcount = atomic_read(&ppage->_count); + pcount = page_mapcount(ppage); if (put_user(pcount, out++)) { ret = -EFAULT; -- 1.5.3.6