From: Roman Lakeev <sunnyddayss@gmail.com>
Cc: Roman Lakeev <sunnyddayss@gmail.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm/slab.c: remove duplicated check of colour_next
Date: Sun, 11 Mar 2018 11:05:29 +0300 [thread overview]
Message-ID: <877eqilr71.fsf@gmail.com> (raw)
In-Reply-To: <87bmfulry9.fsf@gmail.com>
Sorry for strange message in previous mail.
remove check that offset greater than cachep->colour
bacause this is already checked in previous lines
Signed-off-by: Roman Lakeev <sunnyddayss@gmail.com>
---
mm/slab.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 324446621b3e..6a48f122bd82 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2674,11 +2674,7 @@ static struct page *cache_grow_begin(struct kmem_cache *cachep,
if (n->colour_next >= cachep->colour)
n->colour_next = 0;
- offset = n->colour_next;
- if (offset >= cachep->colour)
- offset = 0;
-
- offset *= cachep->colour_off;
+ offset = n->colour_next * cachep->colour_off;
/* Get slab management. */
freelist = alloc_slabmgmt(cachep, page, offset,
--
2.16.2
next prev parent reply other threads:[~2018-03-11 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 12:25 Roman Lakeev
2018-03-11 8:05 ` Roman Lakeev [this message]
2018-03-11 19:49 ` David Rientjes
2018-03-12 13:53 ` Christopher Lameter
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=877eqilr71.fsf@gmail.com \
--to=sunnyddayss@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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