The patch titled pagemap: return map count, not reference count, in /proc/kpagecount has been added to the -mm tree. Its filename is pagemap-return-map-count-not-reference-count-in-proc-kpagecount-v2-of-series.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: pagemap: return map count, not reference count, in /proc/kpagecount From: "Thomas Tuttle" <ttuttle@xxxxxxxxxx> 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@xxxxxxxxxx> Cc: Matt Mackall <mpm@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/proc_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/proc/proc_misc.c~pagemap-return-map-count-not-reference-count-in-proc-kpagecount-v2-of-series fs/proc/proc_misc.c --- a/fs/proc/proc_misc.c~pagemap-return-map-count-not-reference-count-in-proc-kpagecount-v2-of-series +++ a/fs/proc/proc_misc.c @@ -742,7 +742,7 @@ static ssize_t kpagecount_read(struct fi if (!ppage) pcount = 0; else - pcount = atomic_read(&ppage->_count); + pcount = page_mapcount(ppage); if (put_user(pcount, out++)) { ret = -EFAULT; _ Patches currently in -mm which might be from ttuttle@xxxxxxxxxx are pagemap-fix-bug-in-add_to_pagemap-require-aligned-length-reads-of-proc-pid-pagemap-v2-of-series.patch pagemap-fix-bug-in-add_to_pagemap-require-aligned-length-reads-of-proc-pid-pagemap-v2-of-series-checkpatch-fixes.patch pagemap-return-map-count-not-reference-count-in-proc-kpagecount-v2-of-series.patch pagemap-return-einval-not-eio-for-unaligned-reads-of-kpagecount-or-kpageflags-v2-of-series.patch pagemap-add-documentation-for-pagemap.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html