Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/gup: convert to arch_make_folio_accessible()

Let's use arch_make_folio_accessible() instead so we can get rid of
arch_make_page_accessible().

Link: https://lkml.kernel.org/r/20240729183844.388481-3-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
b967c648 e5a41fc7

+5 -3
+5 -3
mm/gup.c
··· 819 819 struct dev_pagemap **pgmap) 820 820 { 821 821 struct mm_struct *mm = vma->vm_mm; 822 + struct folio *folio; 822 823 struct page *page; 823 824 spinlock_t *ptl; 824 825 pte_t *ptep, pte; ··· 877 876 goto out; 878 877 } 879 878 } 879 + folio = page_folio(page); 880 880 881 881 if (!pte_write(pte) && gup_must_unshare(vma, flags, page)) { 882 882 page = ERR_PTR(-EMLINK); ··· 888 886 !PageAnonExclusive(page), page); 889 887 890 888 /* try_grab_folio() does nothing unless FOLL_GET or FOLL_PIN is set. */ 891 - ret = try_grab_folio(page_folio(page), 1, flags); 889 + ret = try_grab_folio(folio, 1, flags); 892 890 if (unlikely(ret)) { 893 891 page = ERR_PTR(ret); 894 892 goto out; ··· 900 898 * Documentation/core-api/pin_user_pages.rst for details. 901 899 */ 902 900 if (flags & FOLL_PIN) { 903 - ret = arch_make_page_accessible(page); 901 + ret = arch_make_folio_accessible(folio); 904 902 if (ret) { 905 903 unpin_user_page(page); 906 904 page = ERR_PTR(ret); ··· 2921 2919 * details. 2922 2920 */ 2923 2921 if (flags & FOLL_PIN) { 2924 - ret = arch_make_page_accessible(page); 2922 + ret = arch_make_folio_accessible(folio); 2925 2923 if (ret) { 2926 2924 gup_put_folio(folio, 1, flags); 2927 2925 goto pte_unmap;