Re: + mm-vma-the-pgoff-is-correct-if-can_merge_right-fix.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 26, 2024 at 07:01:57AM +0100, Lorenzo Stoakes wrote:
>On Fri, Oct 25, 2024 at 09:22:24PM -0700, Andrew Morton wrote:
>> On Sat, 26 Oct 2024 03:34:36 +0000 Wei Yang <richard.weiyang@xxxxxxxxx> wrote:
>>
>> > >------------------------------------------------------
>> > >From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> > >Subject: mm-vma-the-pgoff-is-correct-if-can_merge_right-fix
>> > >Date: Fri Oct 25 07:39:41 PM PDT 2024
>> > >
>> > >remove now-unused local
>> > >
>> > >mm/vma.c: In function 'vma_merge_new_range':
>> > >mm/vma.c:965:23: error: unused variable 'start' [-Werror=unused-variable]
>> > >  965 |         unsigned long start = vmg->start;
>> > >      |                       ^~~~~
>> >
>> > Andrew
>> >
>> > The removal of start usage maybe come from another patch.
>> >
>> > If my understanding is correct, 'start' would be used to restore the state on
>> > expansion failure.
>>
>> I don't think so.  This patch did
>
>Yeah I removed the logic that would do this in a recent series. We can drop start.
>

I see your latest change.

Sounds there is some latency. When I looked at mm-unstable this morning, the
change is not there.

>>
>> > --- a/mm/vma.c
>> > +++ b/mm/vma.c
>> > @@ -915,7 +915,6 @@ struct vm_area_struct *vma_merge_new_range(struct vma_merge_struct *vmg)
>> >  	unsigned long start = vmg->start;
>> >  	unsigned long end = vmg->end;
>> >  	pgoff_t pgoff = vmg->pgoff;
>> > -	pgoff_t pglen = PHYS_PFN(end - start);
>> >  	bool can_merge_left, can_merge_right;
>> >
>> >  	mmap_assert_write_locked(vmg->mm);
>>
>> which was the only usage of `start' in vma_merge_new_range().
>
>Yes this is true now. We're good to drop it, thanks!

-- 
Wei Yang
Help you, Help me




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux