projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b7a403
)
mm: remove unneeded PageAnon check in restore_exclusive_pte()
author
Miaohe Lin
<linmiaohe@huawei.com>
Sat, 16 Jul 2022 08:18:16 +0000
(16:18 +0800)
committer
akpm
<akpm@linux-foundation.org>
Sat, 30 Jul 2022 01:07:16 +0000
(18:07 -0700)
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>
mm/memory.c
patch
|
blob
|
history
diff --git
a/mm/memory.c
b/mm/memory.c
index 8c193b3a32aa919a322b0a5bd8b2381ef22be362..684c4c7cd2ff33b50157827fd7fb896b09ae8de6 100644
(file)
--- 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);