> >> - start = ((zba - vba) << PAGE_SHIFT) + vma->vm_start; >> - size = (zea - zba + 1) << PAGE_SHIFT; >> + const pgoff_t start_idx = max(first_index, vma->vm_pgoff); >> + const pgoff_t end_idx = min(last_index, vma_last_pgoff(vma)) + >> 1; > > I guess since 'end' is by-convention the +1 of last this is fine
Exactly, the calculation itself is not changed. The +1 was previously hiding inside the "(zea - zba + 1)" Thanks! -- Cheers, David
