Skip to contentSkip to conversation

mm-truncate-add-folio_unmap_invalidate-helper.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 20, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/truncate: add folio_unmap_invalidate() helper
has been removed from the -mm tree. Its filename was
mm-truncate-add-folio_unmap_invalidate-helper.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Jens Axboe <[email protected]>
Subject: mm/truncate: add folio_unmap_invalidate() helper
Date: Fri, 20 Dec 2024 08:47:44 -0700

Add a folio_unmap_invalidate() helper, which unmaps and invalidates a given folio. The caller must already have locked the folio. Embed the old invalidate_complete_folio2() helper in there as well, as nobody else calls it.

Use this new helper in invalidate_inode_pages2_range(), rather than duplicate the code there.

In preparation for using this elsewhere as well, have it take a gfp_t mask rather than assume GFP_KERNEL is the right choice. This bubbles back to invalidate_complete_folio2() as well.

Cc Brian Foster <[email protected]>
Cc Chris Mason <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>

---

 mm/internal.h |    2 +
 mm/truncate.c |   53 +++++++++++++++++++++++++-----------------------
 2 files changed, 30 insertions(+), 25 deletions(-)
mm/internal.h renamed from mm/internal.h~mm-truncate-add-folio_unmap_invalidate-helper +2 -0
@@ -392,6 +392,8 @@ void unmap_page_range(struct mmu_gather
 			     struct vm_area_struct *vma,
 			     unsigned long addr, unsigned long end,
 			     struct zap_details *details);
+int folio_unmap_invalidate(struct address_space *mapping, struct folio *folio,
+			   gfp_t gfp);
 
 void page_cache_ra_order(struct readahead_control *, struct file_ra_state *,
 		unsigned int order);
mm/truncate.c renamed from mm/truncate.c~mm-truncate-add-folio_unmap_invalidate-helper +28 -25

80 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are