]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm/swapfile: fix lost swap bits in unuse_pte()
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 19 May 2022 12:50:27 +0000 (20:50 +0800)
committerakpm <akpm@linux-foundation.org>
Fri, 27 May 2022 16:33:46 +0000 (09:33 -0700)
commit14a762dd1977cf811516fd97b0262b747cac88f7
treee2f6d75dd452a200adfaf248cf9877f874769d11
parent9f186f9e5fa9ebdaef909fd45f825a6ce281f13c
mm/swapfile: fix lost swap bits in unuse_pte()

This is observed by code review only but not any real report.

When we turn off swapping we could have lost the bits stored in the swap
ptes.  The new rmap-exclusive bit is fine since that turned into a page
flag, but not for soft-dirty and uffd-wp.  Add them.

Link: https://lkml.kernel.org/r/20220519125030.21486-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Suggested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c