Re: [PATCH 07/13] mm/munlock: mlock_pte_range() when mlocking or munlocking

From: Hugh Dickins
Date: Mon Feb 14 2022 - 01:32:58 EST


On Fri, 11 Feb 2022, Vlastimil Babka wrote:
> On 2/6/22 22:42, Hugh Dickins wrote:
> > @@ -162,8 +230,7 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
> > pgoff_t pgoff;
> > int nr_pages;
> > int ret = 0;
> > - int lock = !!(newflags & VM_LOCKED);
> > - vm_flags_t old_flags = vma->vm_flags;
> > + vm_flags_t oldflags = vma->vm_flags;
> >
> > if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) ||
>
> Nit: can use oldflags instead of vma->vm_flags above?

Yes thanks, that is nicer, I'm making that change now.

Hugh