The patch titled proc: kpagecount/kpageflags code cleanup has been removed from the -mm tree. Its filename was proc-kpagecount-kpageflags-code-cleanup.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: proc: kpagecount/kpageflags code cleanup From: Wu Fengguang <fengguang.wu@xxxxxxxxx> Move increments of pfn/out to bottom of the loop. Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx> Acked-by: Matt Mackall <mpm@xxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/page.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff -puN fs/proc/page.c~proc-kpagecount-kpageflags-code-cleanup fs/proc/page.c --- a/fs/proc/page.c~proc-kpagecount-kpageflags-code-cleanup +++ a/fs/proc/page.c @@ -12,6 +12,7 @@ #define KPMSIZE sizeof(u64) #define KPMMASK (KPMSIZE - 1) + /* /proc/kpagecount - an array exposing page counts * * Each entry is a u64 representing the corresponding @@ -33,20 +34,22 @@ static ssize_t kpagecount_read(struct fi return -EINVAL; while (count > 0) { - ppage = NULL; if (pfn_valid(pfn)) ppage = pfn_to_page(pfn); - pfn++; + else + ppage = NULL; if (!ppage) pcount = 0; else pcount = page_mapcount(ppage); - if (put_user(pcount, out++)) { + if (put_user(pcount, out)) { ret = -EFAULT; break; } + pfn++; + out++; count -= KPMSIZE; } @@ -99,10 +102,10 @@ static ssize_t kpageflags_read(struct fi return -EINVAL; while (count > 0) { - ppage = NULL; if (pfn_valid(pfn)) ppage = pfn_to_page(pfn); - pfn++; + else + ppage = NULL; if (!ppage) kflags = 0; else @@ -120,11 +123,13 @@ static ssize_t kpageflags_read(struct fi kpf_copy_bit(kflags, KPF_RECLAIM, PG_reclaim) | kpf_copy_bit(kflags, KPF_BUDDY, PG_buddy); - if (put_user(uflags, out++)) { + if (put_user(uflags, out)) { ret = -EFAULT; break; } + pfn++; + out++; count -= KPMSIZE; } _ Patches currently in -mm which might be from fengguang.wu@xxxxxxxxx are origin.patch documentation-vm-makefile-dont-try-to-build-slqbinfo.patch linux-next.patch readahead-add-blk_run_backing_dev.patch readahead-add-blk_run_backing_dev-fix.patch readahead-add-blk_run_backing_dev-fix-fix-2.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