Skip to content

Commit 4d8ff64

Browse files
MiaoheLinakpm00
authored andcommitted
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: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 9b7a403 commit 4d8ff64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ static void restore_exclusive_pte(struct vm_area_struct *vma,
744744
* Currently device exclusive access only supports anonymous
745745
* memory so the entry shouldn't point to a filebacked page.
746746
*/
747-
WARN_ON_ONCE(!PageAnon(page));
747+
WARN_ON_ONCE(1);
748748

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

0 commit comments

Comments
 (0)