Re: [PATCH] mm/vmalloc.c: Remove always-true conditional in vmap_init_free_space

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

 



On Tue, Jul 09, 2019 at 01:06:31AM +0800, Pengfei Li wrote:
> When unsigned long variables are subtracted from one another,
> the result is always non-negative.
> 
> The vmap_area_list is sorted by address.
> 
> So the following two conditions are always true.
> 
> 1) if (busy->va_start - vmap_start > 0)
> 2) if (vmap_end - vmap_start > 0)
> 
> Just remove them.

That condition won't be true if busy->va_start == vmap_start.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux