]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hugetlb_cgroup: remove unneeded nr_pages > 0 check
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 29 Jul 2022 08:01:02 +0000 (16:01 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:02 +0000 (15:58 -0700)
commita9739fefb1ab662a5fa03d0d3d62ea9fce9a9403
tree47ad1982daefc06b020d4aee7e37b72f15d872d8
parentdad818815bb71b90f38cc28a3d3d6f5a0c7c115f
hugetlb_cgroup: remove unneeded nr_pages > 0 check

Patch series "A few cleanup patches for hugetlb_cgroup", v2.

This series contains a few cleaup patches to remove unneeded check, use
helper macro, remove unneeded return value and so on.  More details can be
found in the respective changelogs.

This patch (of 5):

When code reaches here, nr_pages must be > 0. Remove unneeded nr_pages > 0
check to simplify the code.

Link: https://lkml.kernel.org/r/20220729080106.12752-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20220729080106.12752-2-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_cgroup.c