projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9a2563
)
gup: convert FOLL_TOUCH case in follow_page_pte() to folio
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Wed, 2 Oct 2024 15:13:27 +0000
(16:13 +0100)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:08 +0000
(20:11 -0800)
We already have the folio here, so just use it, removing three hidden
calls to compound_head().
Link:
https://lkml.kernel.org/r/20241002151403.1345296-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/gup.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/gup.c
b/mm/gup.c
index 4637dab7b54f1dded0758bc696522787610ec1fd..28ae330ec4dd39152c69baac671d2953c0a522bf 100644
(file)
--- a/
mm/gup.c
+++ b/
mm/gup.c
@@
-922,14
+922,14
@@
static struct page *follow_page_pte(struct vm_area_struct *vma,
}
if (flags & FOLL_TOUCH) {
if ((flags & FOLL_WRITE) &&
- !pte_dirty(pte) && !
PageDirty(page
))
-
set_page_dirty(page
);
+ !pte_dirty(pte) && !
folio_test_dirty(folio
))
+
folio_mark_dirty(folio
);
/*
* pte_mkyoung() would be more correct here, but atomic care
* is needed to avoid losing the dirty bit: it is easier to use
- *
mark_page
_accessed().
+ *
folio_mark
_accessed().
*/
-
mark_page_accessed(page
);
+
folio_mark_accessed(folio
);
}
out:
pte_unmap_unlock(ptep, ptl);