From 7969f3059493eeb1aa93151d3ad5aded6af4e836 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Fri, 19 Dec 2025 19:46:00 +0800 Subject: [PATCH] mm/gup: remove no longer used gup_fast_undo_dev_pagemap This helper is no longer used after commit fd2825b0760a ("mm/gup: remove pXX_devmap usage from get_user_pages()"). Link: https://lkml.kernel.org/r/20251219-gup-cleanup-v1-1-348a70d9eecb@tencent.com Signed-off-by: Kairui Song Acked-by: David Hildenbrand (Red Hat) Reviewed-by: Alistair Popple Cc: Jason Gunthorpe Cc: John Hubbard Cc: Peter Xu Signed-off-by: Andrew Morton --- mm/gup.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 95d948c8e86c9..8e7dc2c6ee738 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2806,17 +2806,6 @@ static bool gup_fast_folio_allowed(struct folio *folio, unsigned int flags) return !reject_file_backed || shmem_mapping(mapping); } -static void __maybe_unused gup_fast_undo_dev_pagemap(int *nr, int nr_start, - unsigned int flags, struct page **pages) -{ - while ((*nr) - nr_start) { - struct folio *folio = page_folio(pages[--(*nr)]); - - folio_clear_referenced(folio); - gup_put_folio(folio, 1, flags); - } -} - #ifdef CONFIG_ARCH_HAS_PTE_SPECIAL /* * GUP-fast relies on pte change detection to avoid concurrent pgtable -- 2.47.3