Re: [PATCH v2 1/9] exfat: replace unsafe macros with static inline functions

From: Namjae Jeon

Date: Thu May 07 2026 - 19:38:28 EST


On Thu, May 7, 2026 at 10:41 PM CharSyam <charsyam@xxxxxxxxx> wrote:
>
> Hi. Namjae.
Hi Daemyung,
>
> in fs/exfat/inode.c
>
> - inode->i_blocks += EXFAT_CLU_TO_B(num_to_be_allocated,
> sbi) >> 9;
> + inode->i_blocks +=
> + exfat_cluster_to_sectors(sbi, num_to_be_allocated) >> 9;
>
> exfat_cluster_to_sectors() already returns a 512-byte block count, so
> the extra >> 9 makes i_blocks 512 times too small.
Right, I will fix it in the next version.
Thanks.