]> git.baikalelectronics.ru Git - kernel.git/commit
mm, memcg: fix mem_cgroup_swapout() for THPs
authorShakeel Butt <shakeelb@google.com>
Thu, 30 Nov 2017 00:11:15 +0000 (16:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Nov 2017 02:40:43 +0000 (18:40 -0800)
commit905eab7ef7849221fb0a827e17c6172dbb23e6b6
treef0b15abee17ec14b6c04e166bf240fdd514eafbd
parent28736786d54f94824dd6109d6e31816a004a029c
mm, memcg: fix mem_cgroup_swapout() for THPs

Commit 3dad72b7eaa8 ("memcg, THP, swap: make mem_cgroup_swapout()
support THP") changed mem_cgroup_swapout() to support transparent huge
page (THP).

However the patch missed one location which should be changed for
correctly handling THPs.  The resulting bug will cause the memory
cgroups whose THPs were swapped out to become zombies on deletion.

Link: http://lkml.kernel.org/r/20171128161941.20931-1-shakeelb@google.com
Fixes: 3dad72b7eaa8 ("memcg, THP, swap: make mem_cgroup_swapout() support THP")
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c