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>
This commit is contained in:
committed by
Linus Torvalds
parent
a4fa7ef037
commit
bbcdac0c20
@@ -726,7 +726,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
|
|||||||
if (!ppage)
|
if (!ppage)
|
||||||
pcount = 0;
|
pcount = 0;
|
||||||
else
|
else
|
||||||
pcount = atomic_read(&ppage->_count);
|
pcount = page_mapcount(ppage);
|
||||||
|
|
||||||
if (put_user(pcount, out++)) {
|
if (put_user(pcount, out++)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
|
Reference in New Issue
Block a user