Re: [PATCH v4 6/9] xfs: clamp the pNFS layout range to the maximum file size
From: Christoph Hellwig
Date: Wed Oct 28 2026 - 12:11:19 EST
On Tue, Oct 20, 2026 at 12:08:49PM +0900, Daejun Park via B4 Relay wrote:
> - if (offset > limit)
> + if (offset < 0 || offset >= limit)
> goto out_unlock;
> - if (offset > limit - length)
> + if (length > limit - offset)
> length = limit - offset;
This could use min(), but either way the change looks gind:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
(a slightly shorted and to the point commit log wouldn't hurt either..)