summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorThomas Tuttle <ttuttle@google.com>2008-06-06 07:46:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-06 20:29:13 +0200
commitbbcdac0c20aa20d1daad41d9c138102b70e5aae4 (patch)
tree8e1f8ffdceacc788f78d21348ccff1a1f9c3cc25 /fs/proc
parenthdaps: fix module loading on Thinkpad T61P (diff)
downloadlinux-bbcdac0c20aa20d1daad41d9c138102b70e5aae4.tar.xz
linux-bbcdac0c20aa20d1daad41d9c138102b70e5aae4.zip
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 <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>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 32dc14cd8900..5a16090a6d6e 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;