2023-01-13 11:36 GMT+09:00, Yuezhang.Mo@xxxxxxxx <Yuezhang.Mo@xxxxxxxx>: >> + if (!(flags & ALLOC_FAT_CHAIN) || !start_clu || !size) >> + return; > > From '7.9.2.2 NoFatChain Field' of the exFAT spec, flags can also be > ALLOC_NO_FAT_CHAIN. > > The NoFatChain field shall conform to the definition provided in the Generic > Secondary DirectoryEntry template (see Section 6.4.2.2). This is to check the AllocationPossible field. We can probably add ALLOC_POSSIBLE macro to avoid confusion. > >> + if (exfat_get_entry_type(ep) & TYPE_BENIGN_SEC) >> + exfat_free_benign_secondary_clusters(inode, ep); >> + > > Only vendor allocation entry(0xE1) have associated cluster allocations, > vendor extension entry(0xE0) do not have associated cluster allocations. This is to free associated cluster allocation of the unrecognized benign secondary entries, not only vendor alloc entry. Could you elaborate more if there is any issue ? >