Message ID | 20211004134650.4031813-47-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 21B3AC433EF for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:47:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C0D276139F for <linux-mm@archiver.kernel.org>; Mon, 4 Oct 2021 14:47:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C0D276139F 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 57A2994004A; Mon, 4 Oct 2021 10:47:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 52A1E94000B; Mon, 4 Oct 2021 10:47:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 440A294004A; Mon, 4 Oct 2021 10:47:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id 3348794000B for <linux-mm@kvack.org>; Mon, 4 Oct 2021 10:47:20 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E53418249980 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:47:19 +0000 (UTC) X-FDA: 78659032998.29.055C88B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 90737801C341 for <linux-mm@kvack.org>; Mon, 4 Oct 2021 14:47:19 +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=qgXZu60O0l8b5tmOOZNb1Kde1E8gMK34R63EDEncCF8=; b=Qr56fSpqhJK3/SgiyGavpkoyIM NX6Mz3DkgQDU8Aqw6ggaant5iF4mQPr5QrJUyQmzCCIA9IgPxFNK7OhVwBCenS7IPMY0NQ60uZY7F 6cyfIEciKyfNM+6wXGbJ4029SdW0j8313gT5MHgZgMSjbJsptpBn/QH8q47wxtgx61b4nL810WDlB yTbN9oLP7eVp7VeBVezt7+ZtsZF7kzGUfnZk7NOrPnCK+yVf6V8JAE1UVttzp5oZR3wrL2Kg0AgnU lXw7tZfwhGvu2jVXKQMqkNfoNZQugN64kyFATkRlTwmobcbTEMLYoLs7Moq/vG/CD926O91kB2VjP IXU3gx/g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXPDN-00H184-8Z; Mon, 04 Oct 2021 14:45:42 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Subject: [PATCH 46/62] mm/slub: Convert print_page_info() to print_slab_info() Date: Mon, 4 Oct 2021 14:46:34 +0100 Message-Id: <20211004134650.4031813-47-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 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Qr56fSpq; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 90737801C341 X-Stat-Signature: un5bmm14ezkcdnxf4nzbnr6bgbyifhpm X-HE-Tag: 1633358839-10647 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 98cc2545a9bd..d941bd188a8e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -761,12 +761,11 @@ void print_tracking(struct kmem_cache *s, void *object) print_track("Freed", get_track(s, object, TRACK_FREE), pr_time); } -static void print_page_info(struct page *page) +static void print_slab_info(struct slab *slab) { pr_err("Slab 0x%p objects=%u used=%u fp=0x%p flags=%#lx(%pGp)\n", - page, page->objects, page->inuse, page->freelist, - page->flags, &page->flags); - + slab, slab->objects, slab->inuse, slab->freelist, + slab->flags, &slab->flags); } static void slab_bug(struct kmem_cache *s, char *fmt, ...) @@ -823,7 +822,7 @@ static void print_trailer(struct kmem_cache *s, struct slab *slab, u8 *p) print_tracking(s, p); - print_page_info(slab_page(slab)); + print_slab_info(slab); pr_err("Object 0x%p @offset=%tu fp=0x%p\n\n", p, p - addr, get_freepointer(s, p)); @@ -879,7 +878,7 @@ static __printf(3, 4) void slab_err(struct kmem_cache *s, struct slab *slab, vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); slab_bug(s, "%s", buf); - print_page_info(slab_page(slab)); + print_slab_info(slab); dump_stack(); add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); }
Improve the type safety and remove calls to slab_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)