diff options
| author | Miaohe Lin <[email protected]> | 2022-07-16 16:18:16 +0800 |
|---|---|---|
| committer | akpm <[email protected]> | 2022-07-29 18:07:16 -0700 |
| commit | 4d8ff64097092701a5e5506d0d7f643d421e0432 (patch) | |
| tree | f374e62e158efea14eb624205f490f9893e6e768 | |
| parent | 9b7a4039d6856f66521486da68c76838929039eb (diff) | |
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/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 8c193b3a32aa..684c4c7cd2ff 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -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); |