]> git.baikalelectronics.ru Git - kernel.git/commit
tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures
authorAnthony Yznaga <anthony.yznaga@oracle.com>
Fri, 28 Dec 2018 08:37:27 +0000 (00:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 20:11:50 +0000 (12:11 -0800)
commiteba9b46d2dfe6800e2d985918bc99f08fed65eeb
treef4907a91dafc0fdb029a0a93341c5cb9cb14e5e3
parent161ba837b635731416d4444e2fd3a191624deb1a
tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures

Because kpagecount_read() fakes success if map counts are not being
collected, clamp the page count passed to it by walk_pfn() to the pages
value returned by the preceding call to kpageflags_read().

Link: http://lkml.kernel.org/r/1543962269-26116-1-git-send-email-anthony.yznaga@oracle.com
Fixes: 0ef07add19d2 ("tools/vm/page-types.c: include shared map counts")
Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/vm/page-types.c