mm/memcg: avoid page count check for zone device
authorJérôme Glisse <jglisse@redhat.com>
Tue, 3 Oct 2017 23:14:57 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Oct 2017 00:54:24 +0000 (17:54 -0700)
commit3f2eb0287ebd62ec8d6d544f830285302279e6bf
tree5766ffd772c97ed7e06decf7aeb3514bbc034071
parent72f0184c8a00c70179cfed6266e2e06b4d400065
mm/memcg: avoid page count check for zone device

Fix for 4.14, zone device page always have an elevated refcount of one
and thus page count sanity check in uncharge_page() is inappropriate for
them.

[mhocko@suse.com: nano-optimize VM_BUG_ON in uncharge_page]
Link: http://lkml.kernel.org/r/20170914190011.5217-1-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reported-by: Evgeny Baskakov <ebaskakov@nvidia.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c