mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 12:25:18 +02:00
BACKPORT: mm: remove PageAnonExclusive assertions in unuse_pte()
The page in question is either freshly allocated or known to be in
the swap cache; these assertions are not particularly useful.
Link: https://lkml.kernel.org/r/20231212164813.2540119-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 8d294a8c63
)
[ Fix trivial conflict in mm/swapfile.c - Kalesh Singh ]
Bug: 313807618
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Change-Id: I932718a3dbe7216c6119ff666406ff0661a97298
This commit is contained in:
parent
fe52579d8c
commit
38de31bd03
|
@ -1809,10 +1809,6 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
|
||||||
*/
|
*/
|
||||||
arch_swap_restore(folio_swap(entry, folio), folio);
|
arch_swap_restore(folio_swap(entry, folio), folio);
|
||||||
|
|
||||||
/* See do_swap_page() */
|
|
||||||
BUG_ON(!PageAnon(page) && PageMappedToDisk(page));
|
|
||||||
BUG_ON(PageAnon(page) && PageAnonExclusive(page));
|
|
||||||
|
|
||||||
dec_mm_counter(vma->vm_mm, MM_SWAPENTS);
|
dec_mm_counter(vma->vm_mm, MM_SWAPENTS);
|
||||||
inc_mm_counter(vma->vm_mm, MM_ANONPAGES);
|
inc_mm_counter(vma->vm_mm, MM_ANONPAGES);
|
||||||
get_page(page);
|
get_page(page);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user