Skip to content

Commit

Permalink
pagemap: return map count, not reference count, in /proc/kpagecount
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Matt Mackall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Thomas Tuttle authored and torvalds committed Jun 6, 2008
1 parent a4fa7ef commit bbcdac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/proc_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbcdac0

Please sign in to comment.