[PATCH 15/41] minix: Sync and invalidate metadata buffers from minix_evict_inode()

Jan Kara
2026-03-20T13:42:39Z

There are only very few filesystems using generic metadata buffer head
tracking and everybody is paying the overhead. When we remove this
tracking for inode reclaim code .evict will start to see inodes with
metadata buffers attached so write them out and prune them.

Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/minix/inode.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 99541c6a5bbf..ab7c06efb139 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -48,6 +48,8 @@ static void minix_evict_inode(struct inode *inode)
if (!inode->i_nlink) {
inode->i_size = 0;
minix_truncate(inode);
+ } else {
+ sync_mapping_buffers(&inode->i_data);
}
invalidate_inode_buffers(inode);
clear_inode(inode);
--
2.51.0