diff options
author | Kaitao Cheng <pilgrimtao@gmail.com> | 2020-01-31 07:13:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-31 19:30:38 +0100 |
commit | 92855270ff0827865109447b59e7e5df9c2bef68 (patch) | |
tree | f1e71292138614bee4992993a33c30d0dc9f90b5 /mm/page_vma_mapped.c | |
parent | mm/swapfile.c: swap_next should increase position index (diff) | |
download | linux-92855270ff0827865109447b59e7e5df9c2bef68.tar.xz linux-92855270ff0827865109447b59e7e5df9c2bef68.zip |
mm/memcontrol.c: cleanup some useless code
Compound pages handling in mem_cgroup_migrate is more convoluted than
necessary. The state is duplicated in compound variable and the same
could be achieved by PageTransHuge check which is trivial and
hpage_nr_pages is already PageTransHuge aware.
It is much simpler to just use hpage_nr_pages for nr_pages and replace
the local variable by PageTransHuge check directly
Link: http://lkml.kernel.org/r/20191210160450.3395-1-pilgrimtao@gmail.com
Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.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>
Diffstat (limited to 'mm/page_vma_mapped.c')
0 files changed, 0 insertions, 0 deletions