From 235ab133a77523c3877473fc92f97f0cf9621109 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Thu, 12 Sep 2024 12:20:20 -0700 Subject: [PATCH] We must provide a_ops->dirty_folio and invalidate_folio. In v5.17-rc4-53-g3a3bae50af5d, we can no longer omit having this method unhooked as the mm caller blindly calls it now. In-kernel filesystems all were fixed in this change. aops->invalidatepage was the old aops method that would free pages with private attached data. This method is replaced with the new invalidate_folio method. If this method is NULL, the memory will become orphaned. (v5.17-rc4-29-gf50015a596fa) Signed-off-by: Auke Kok --- kmod/src/data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmod/src/data.c b/kmod/src/data.c index 7045d547..909167bc 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -1916,6 +1916,8 @@ int scoutfs_data_waiting(struct super_block *sb, u64 ino, u64 iblock, const struct address_space_operations scoutfs_file_aops = { #ifdef KC_MPAGE_READ_FOLIO + .dirty_folio = block_dirty_folio, + .invalidate_folio = block_invalidate_folio, .read_folio = scoutfs_read_folio, #else .readpage = scoutfs_readpage,