Re: [PATCH v3 0/6] exfat: unify FAT chain walking helpers

Namjae Jeon
2026-04-03T13:45:01Z

On Fri, Apr 3, 2026 at 5:06 PM Chi Zhiling <chizhiling@163.com> wrote:
>
> From: Chi Zhiling <chizhiling@kylinos.cn>
>
> This series introduces and uses two new helpers to simplify FAT chain
> walking logic across the exfat driver:
>
> 1. exfat_fat_walk - walks FAT chain by a given step, handling both
> ALLOC_NO_FAT_CHAIN and ALLOC_FAT_CHAIN modes
>
> 2. exfat_chain_advance - walks an exfat_chain structure by a given step,
> updating both ->dir and ->size fields atomically with proper boundary
> checking
>
> These helpers replace open-coded cluster walking logic in dir.c, namei.c
> and inode.c, improving code readability and ensuring consistent error
> handling for corrupted FAT chains.
>
> Also includes a fix for incorrect directory checksum when renaming a
> file to a shorter name.
>
> ---
>
> Changes in v3:
> - rework exfat_chain_advance
> - add error handling in exfat_find_location
> - misc tweaks
>
> v1:https://lore.kernel.org/linux-fsdevel/20260331091113.20882-1-chizhiling@163.com/
> v2:https://lore.kernel.org/linux-fsdevel/20260401071138.114836-1-chizhiling@163.com/
>
>
> Chi Zhiling (6):
> exfat: fix incorrect directory checksum after rename to shorter name
> exfat: introduce exfat_cluster_walk helper
> exfat: use exfat_cluster_walk helper
> exfat: remove NULL cache pointer case in exfat_ent_get
> exfat: introduce exfat_chain_advance helper
> exfat: use exfat_chain_advance helper
Applied them to #dev.
Thanks!