summaryrefslogtreecommitdiff
path: root/mm/damon
diff options
context:
space:
mode:
authorQi Zheng <zhengqi.arch@bytedance.com>2022-08-18 11:27:48 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-09-12 06:25:58 +0300
commitc8bb41631bc2ecc6434e93232c031c7a218ebe81 (patch)
tree92915ac1ef450913c173f3177ea0673be0ab5ea4 /mm/damon
parent48309e1f6f7b15b041b39b7f15e7adc1c7e2de95 (diff)
downloadlinux-c8bb41631bc2ecc6434e93232c031c7a218ebe81.tar.xz
mm: thp: remove redundant pgtable check in set_huge_zero_page()
When the pgtable is NULL in the set_huge_zero_page(), we should not increment the count of PTE page table pages by calling mm_inc_nr_ptes(). Otherwise we may receive the following warning when the mm exits: BUG: non-zero pgtables_bytes on freeing mm Now we can't observe the above warning since only do_huge_pmd_anonymous_page() invokes set_huge_zero_page() and the pgtable can not be NULL. Therefore, instead of moving mm_inc_nr_ptes() to the non-NULL branch of pgtable, it is better to remove the redundant pgtable check directly. Link: https://lkml.kernel.org/r/20220818082748.40021-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
0 files changed, 0 insertions, 0 deletions