Re: [PATCH v3] mm: get rid of odd jump labels in find_mergeable_anon_vma()

From: linmiaohe
Date: Mon Nov 18 2019 - 06:31:14 EST


David Hildenbrand wrote:
> On 18.11.19 07:39, linmiaohe wrote:
>> From: Miaohe Lin <linmiaohe@xxxxxxxxxx>
>>
>> The jump labels try_prev and none are not really needed in
>> find_mergeable_anon_vma(), eliminate them to improve readability.
>
>I think you can get rid of near completely as well
>
> if (vma->vm_next) {
> anon_vma = reusable_anon_vma(near, vma, vma->vm_next);
> if (anon_vma)
> return anon_vma;
> }
>
>...
>
>Apart from that looks good to me.
>
>>
>> - anon_vma = reusable_anon_vma(near, vma, near);
>> - if (anon_vma)
>> - return anon_vma;
>> -try_prev:
>> + /* Try prev next. */
>> near = vma->vm_prev;
>> - if (!near)

Thanks for your advice again. I will get rid of near completely in v4. Thanks a lot.