From: Thomas Tuttle Date: Fri, 6 Jun 2008 05:46:58 +0000 (-0700) Subject: pagemap: return map count, not reference count, in /proc/kpagecount X-Git-Tag: v2.6.26-rc6~40 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbcdac0c20aa20d1daad41d9c138102b70e5aae4;p=linux-2.6 pagemap: return map count, not reference count, in /proc/kpagecount Since pagemap is all about examining pages mapped into processes' memory spaces, it makes sense for kpagecount to return the map counts, not the reference counts. Signed-off-by: Thomas Tuttle Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 32dc14cd89..5a16090a6d 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;