Re: [PATCH] xfs: fix f_bfree underflow in statfs()

From: Carlos Maiolino

Date: Wed Nov 18 2026 - 03:59:10 EST


On Thu, 12 Nov 2026 05:20:18 -0500, Hengyu Liang wrote:
> Commit dd324cb79e54 ("xfs: refactor xfs_fs_statfs") made
> xfs_statfs_data() limit f_bfree with max(0LL, ...) instead of
> max_t(int64_t, 0, ...).
>
> However, the value is an unsigned difference, so max() never picks 0.
> As of now, when the free block counter is below the count of
> unavailable blocks, statfs() reports f_bfree and f_bavail close to 2^64
> instead of 0, and df prints negative sizes.
>
> [...]

Applied to for-next, thanks!

[1/1] xfs: fix f_bfree underflow in statfs()
commit: f0b9e58eee233547e5d77e467ccee89d7a59dd63

Best regards,
--
Carlos Maiolino <cem@xxxxxxxxxx>