Re: [PATCH 5/6] xfs: clamp timestamp nanoseconds correctly
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jul 13, 2026 at 11:07:15PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <[email protected]> > > LOLLM noticed an off-by-one error in the nsec clamping; fix that so that > we never have tv_nsec == 1e9. Hah.. > { > - ts->tv_nsec = clamp_t(long, ts->tv_nsec, 0, NSEC_PER_SEC); > + ts->tv_nsec = clamp_t(long, ts->tv_nsec, 0, NSEC_PER_SEC - 1); > *ts = timestamp_truncate(*ts, VFS_I(ip)); Looks good: Reviewed-by: Christoph Hellwig <[email protected]> But I'd really expect this would be handled by core timing/timestamp helpers. >