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 an updated version will be merged 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> Cc: Matt Mackall <mpm@xxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/page.c | 16 ++++++++++------ 1 file changed, 10 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 @@ -32,20 +32,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; } @@ -98,10 +100,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 @@ -119,11 +121,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 linux-next.patch readahead-make-mmap_miss-an-unsigned-int.patch readahead-move-max_sane_readahead-calls-into-force_page_cache_readahead.patch readahead-apply-max_sane_readahead-limit-in-ondemand_readahead.patch readahead-remove-one-unnecessary-radix-tree-lookup.patch readahead-increase-interleaved-readahead-size.patch readahead-remove-sync-async-readahead-call-dependency.patch readahead-clean-up-and-simplify-the-code-for-filemap-page-fault-readahead.patch readahead-sequential-mmap-readahead.patch readahead-enforce-full-readahead-size-on-async-mmap-readahead.patch readahead-record-mmap-read-around-states-in-file_ra_state.patch radix-tree-add-radix_tree_prev_hole.patch readahead-move-the-random-read-case-to-bottom.patch readahead-introduce-context-readahead-algorithm.patch readahead-introduce-context-readahead-algorithm-update.patch readahead-remove-redundant-test-in-shrink_readahead_size_eio.patch readahead-enforce-full-sync-mmap-readahead-size.patch pagemap-document-clarifications.patch pagemap-documentation-9-more-exported-page-flags.patch proc-kpagecount-kpageflags-code-cleanup.patch vmscan-cleanup-the-scan-batching-code.patch vmscan-dont-export-nr_saved_scan-in-proc-zoneinfo.patch vmscan-zvc-updates-in-shrink_active_list-can-be-done-once.patch inotify-reimplement-inotify-using-fsnotify-report-rounded-up-event-size-to-user-space.patch mm-introduce-pagehuge-for-testing-huge-gigantic-pages.patch slob-use-pg_slab-for-identifying-slob-pages.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