lkml.org 
[lkml]   [2022]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: remove unneeded PageAnon check in restore_exclusive_pte()
Date
When code reaches here, the page must be !PageAnon. There's no need to
check PageAnon again. Remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index f671b2dce1fe..d98f89cee3e9 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -753,7 +753,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);

--
2.23.0
\
 
 \ /
  Last update: 2022-07-16 10:19    [W:3.376 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site