]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pagemap: return map count, not reference count, in /proc/kpagecount
authorThomas Tuttle <ttuttle@google.com>
Fri, 6 Jun 2008 05:46:58 +0000 (22:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2008 18:29:13 +0000 (11:29 -0700)
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 <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/proc_misc.c

index 32dc14cd890058dcdd1424a3c1d8ff5c3134c28e..5a16090a6d6e270086bf136f84aaf14b0f8ddb26 100644 (file)
@@ -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;