mm/hugetlb: unify clearing of RestoreReserve for private pages
authorPeter Xu <peterx@redhat.com>
Thu, 20 Oct 2022 19:38:32 +0000 (15:38 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 9 Nov 2022 01:37:19 +0000 (17:37 -0800)
commit4781593d5dbae50500d1c7975be03b590ae2b92a
treee2b18b386f0470fa4d06ba21e6dbb04daa78b32e
parentcc03817c0e8417419ede18a8e0749c5b9699b135
mm/hugetlb: unify clearing of RestoreReserve for private pages

A trivial cleanup to move clearing of RestoreReserve into adding anon rmap
of private hugetlb mappings.  It matches with the shared mappings where we
only clear the bit when adding into page cache, rather than spreading it
around the code paths.

Link: https://lkml.kernel.org/r/20221020193832.776173-1-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c
mm/rmap.c