Re: [PATCH] Subject: [PATCH] exfat: use truncate_inode_pages_final() at evict_inode()

From: Namjae Jeon

Date: Thu Feb 26 2026 - 04:44:45 EST


On Wed, Feb 25, 2026 at 11:59 PM Yang Wen <anmuxixixi@xxxxxxxxx> wrote:
>
> Currently, exfat uses truncate_inode_pages() in exfat_evict_inode().
> However, truncate_inode_pages() does not mark the mapping as exiting,
> so reclaim may still install shadow entries for the mapping until
> the inode teardown completes.
>
> In older kernels like Linux 5.10, if shadow entries are present
> at that point,clear_inode() can hit
>
> BUG_ON(inode->i_data.nrexceptional);
>
> To align with VFS eviction semantics and prevent this situation,
> switch to truncate_inode_pages_final() in ->evict_inode().
>
> Other filesystems were updated to use truncate_inode_pages_final()
> in ->evict_inode() by commit 91b0abe36a7b ("mm + fs: store shadow
> entries in page cache")'.
>
> Signed-off-by: Yang Wen <anmuxixixi@xxxxxxxxx>
Applied it to #dev.
Thanks!