From: Matthew Wilcox <willy@infradead.org>
To: Pengfei Li <lpf.vector@gmail.com>
Cc: akpm@linux-foundation.org, urezki@gmail.com, rpenyaev@suse.de,
peterz@infradead.org, guro@fb.com, rick.p.edgecombe@intel.com,
rppt@linux.ibm.com, aryabinin@virtuozzo.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmalloc.c: Remove always-true conditional in vmap_init_free_space
Date: Mon, 8 Jul 2019 10:35:34 -0700 [thread overview]
Message-ID: <20190708173534.GF32320@bombadil.infradead.org> (raw)
In-Reply-To: <20190708170631.2130-1-lpf.vector@gmail.com>
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.
next prev parent reply other threads:[~2019-07-08 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 17:06 Pengfei Li
2019-07-08 17:35 ` Matthew Wilcox [this message]
2019-07-08 17:57 ` Pengfei Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190708173534.GF32320@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lpf.vector@gmail.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=rpenyaev@suse.de \
--cc=rppt@linux.ibm.com \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox