Message ID | 20211004134650.4031813-20-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=Fowb=OY=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 460E4C433F5 for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:11:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E7D446023F for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:11:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E7D446023F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 813EC94002A; Mon, 4 Oct 2021 10:11:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 79D4794000B; Mon, 4 Oct 2021 10:11:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63E7E94002A; Mon, 4 Oct 2021 10:11:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id 5499894000B for <linux-mm@kvack.org>; Mon, 4 Oct 2021 10:11:55 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 176A582499A8 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:11:55 +0000 (UTC) X-FDA: 78658943790.04.6AC728F Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id C9C7A9001ABB for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=cXBdrdA9TcdFx59rYNaEfuBgOW0hmiV75gdg/RFtgIo=; b=C10/AReJdH6wvcs8fGyYIwqk7t zYAbCeeVnsm4VLMhmuYK0Tr2x280kKlWieTqaQRVVYH/KRp4hilcgb8jDCLUP5oBGP4/vB3ndHos2 vPA/OQjjFkxLdZ+QVaSBPMH/NQidkzEMdQKTjwOsqBvnFqlHHhWDjQcT51oooz/Ulq9l9Zpv4tg3r u1rxrmEeJ3hvvSYRG5Q295nTL1o9mw6NPNb8/FclOs7P3rp+xW+n1Ikfdu0vPovZiI3eRYuk+VJHz fn+8CHn0h18CXOiENYdmeB3CznzNQTCgxvaLeOWi2J7bdhcxrDu74kp2yhhfD/6zGmaoR/KC+mq9/ 3KljraeQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXOdm-00GxYN-ID; Mon, 04 Oct 2021 14:09:17 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Subject: [PATCH 19/62] mm/slub: Convert bootstrap() to struct slab Date: Mon, 4 Oct 2021 14:46:07 +0100 Message-Id: <20211004134650.4031813-20-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211004134650.4031813-1-willy@infradead.org> References: <20211004134650.4031813-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: C9C7A9001ABB X-Stat-Signature: j6kkxw13tnwga3bcgncqzo4qw8urimxg Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="C10/AReJ"; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1633356714-242972 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Separate struct slab from struct page
|
expand
|
diff --git a/mm/slub.c b/mm/slub.c index fc1a7f7832c0..f760accb0feb 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4768,14 +4768,14 @@ static struct kmem_cache * __init bootstrap(struct kmem_cache *static_cache) */ __flush_cpu_slab(s, smp_processor_id()); for_each_kmem_cache_node(s, node, n) { - struct page *p; + struct slab *slab; - list_for_each_entry(p, &n->partial, slab_list) - p->slab_cache = s; + list_for_each_entry(slab, &n->partial, slab_list) + slab->slab_cache = s; #ifdef CONFIG_SLUB_DEBUG - list_for_each_entry(p, &n->full, slab_list) - p->slab_cache = s; + list_for_each_entry(slab, &n->full, slab_list) + slab->slab_cache = s; #endif } list_add(&s->list, &slab_caches);
Adds a little type safety. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)