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, 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

> --- 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().




[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