Re: [PATCH] shmem: skip empty unmap ranges when punching holes
From: David Hildenbrand (Arm)
Date: Tue Nov 03 2026 - 14:41:58 EST
On 11/3/26 20:38, Hungyu Lin wrote:
>> Can this be >= ?
>
> I think we should keep > here, since unmap_end + 1 is the exclusive
> end. Equality would pass a zero length to unmap_mapping_range(),
> which means unmap to EOF. For example, with offset = 0 and len = 1,
> both sides are zero.
>= is much clearer than then +1 trick, no?
To be clear, I was asking whether we could do
if ((u64)(unmap_end) >= (u64)unmap_start)
--
Cheers,
David