From: Jan Kara Date: Thu, 26 Mar 2026 09:54:15 +0000 (+0100) Subject: affs: Sync and invalidate metadata buffers from affs_evict_inode() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23dae9e189de56c462a99c1695c1a2b3c499251b;p=thirdparty%2Fkernel%2Flinux.git affs: Sync and invalidate metadata buffers from affs_evict_inode() 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 Link: https://patch.msgid.link/20260326095354.16340-63-jack@suse.cz Tested-by: syzbot@syzkaller.appspotmail.com Signed-off-by: Christian Brauner --- diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 0bfc7d151dcd3..84afa862f220d 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c @@ -267,6 +267,8 @@ affs_evict_inode(struct inode *inode) if (!inode->i_nlink) { inode->i_size = 0; affs_truncate(inode); + } else { + sync_mapping_buffers(&inode->i_data); } invalidate_inode_buffers(inode);