]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
affs: Sync and invalidate metadata buffers from affs_evict_inode()
authorJan Kara <jack@suse.cz>
Thu, 26 Mar 2026 09:54:15 +0000 (10:54 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 26 Mar 2026 14:03:29 +0000 (15:03 +0100)
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>
Link: https://patch.msgid.link/20260326095354.16340-63-jack@suse.cz
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/affs/inode.c

index 0bfc7d151dcd383af31d1fa41723e7391ec9d4c0..84afa862f220dcfabec6ffee7132ffd07fcacb4e 100644 (file)
@@ -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);