From: Pengfei Li <lpf.vector@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, Uladzislau Rezki <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: Tue, 9 Jul 2019 01:57:59 +0800 [thread overview]
Message-ID: <CAD7_sbEog0OQ+Bxg1nNt2CWgHHLqf602dzhAHTAThPjwK3yitQ@mail.gmail.com> (raw)
In-Reply-To: <20190708173534.GF32320@bombadil.infradead.org>
On Tue, Jul 9, 2019 at 1:35 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> 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.
Yes, you're right.
Sorry for my bad job.
prev parent reply other threads:[~2019-07-08 17:58 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
2019-07-08 17:57 ` Pengfei Li [this message]
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=CAD7_sbEog0OQ+Bxg1nNt2CWgHHLqf602dzhAHTAThPjwK3yitQ@mail.gmail.com \
--to=lpf.vector@gmail.com \
--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=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=rpenyaev@suse.de \
--cc=rppt@linux.ibm.com \
--cc=urezki@gmail.com \
--cc=willy@infradead.org \
/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