Commit 4d8ff640 authored by Miaohe Lin's avatar Miaohe Lin Committed by Andrew Morton
Browse files

mm: remove unneeded PageAnon check in restore_exclusive_pte()

When code reaches here, the page must be !PageAnon.  There's no need to
check PageAnon again.  Remove it.

Link: https://lkml.kernel.org/r/20220716081816.10752-1-linmiaohe@huawei.com


Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 9b7a4039
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ static void restore_exclusive_pte(struct vm_area_struct *vma,
		 * Currently device exclusive access only supports anonymous
		 * memory so the entry shouldn't point to a filebacked page.
		 */
		WARN_ON_ONCE(!PageAnon(page));
		WARN_ON_ONCE(1);

	set_pte_at(vma->vm_mm, address, ptep, pte);