Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3597210pxb; Wed, 13 Oct 2021 09:05:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2G/qE0xvOSWbcFiBC/CuQdjqfDO29oPeg7Yb1bjqE0wYMDuv8PEgHnkrS2/cNUpbdc9v+ X-Received: by 2002:a65:62d1:: with SMTP id m17mr28375418pgv.370.1634141110402; Wed, 13 Oct 2021 09:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634141110; cv=none; d=google.com; s=arc-20160816; b=ang+7KwLI4y76rBtKsVUnpByH4iABeXQ/RmJ/OaPl/lH3r5Pog5uPdisudclT8CGr1 CK5o3XlT1aotDFaE9LwMC8Uip2qLxNrJTUC421JQHNN0NE2kne6GupCxYInk3vPh/ZRP UZV1UNSVQ3i7LWfeaQ8WZ7brKsb4fPzoLbMYtAcu1kwTWud55/LDl95VVfW3kY8Q56Tm 6kblJS4xxSMnrQEkvQqLKVLVZqfjaoGPc/yyRpkD78mJUZR7y+QEVdMdF3yswWTEvdKe v15aia9nAwBYXgRO4Lr48+vC0iSPrRTi77byDc0IaJQTKK3vWjNa4CsvgODG8IaNE+ni v5Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JqXrOW1sz81l7piXeJ6TmVlYLqW03X51G3JR7Qr/jYw=; b=EgpXqG3P6clefVPij1MoLFgWIvS1c5J/XXLc1MgdugwXk6iCZnsOnFEEIY5Gl1o41p OY9J6GhvLQiHCBwiRFuSO7qRx4mCp1Vb//zilG/eydePFyCFGlISoJIF7wd8qJmIOdh5 X7AmIMzCWkYKrvKymZ3sPPvb3G37GaDJCbFU3uWPNTPCIjXoY7O4m1sBqeUrx6Bcj/V6 kBsWIRCFy2zYTLd11hR7XOWDJ8WG3PF9r+FVsBzeuhc8oh+/Vhz4w2f2SsNie0Eu/+Y8 M/wxyFUlu9VOhR9qEyTtWwuzInagGxxtaemfKHQKo4vV+ZIfDIDl4qb48RQe0kMbUZZV 1n+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mpN2Ljf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ge11si8666523pjb.159.2021.10.13.09.04.47; Wed, 13 Oct 2021 09:05:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mpN2Ljf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237660AbhJMQDH (ORCPT + 99 others); Wed, 13 Oct 2021 12:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237837AbhJMQDA (ORCPT ); Wed, 13 Oct 2021 12:03:00 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBBC8C061766; Wed, 13 Oct 2021 09:00:56 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id r17so2966381qtx.10; Wed, 13 Oct 2021 09:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JqXrOW1sz81l7piXeJ6TmVlYLqW03X51G3JR7Qr/jYw=; b=mpN2Ljf6OWSB7Vva54RoUDfZ6Q3KNqIBKGRBHhpr6j0955npGcPr5zboDSUBt8+OMH EbZ15JvJ8T9M34AHEeXip3qHWrrwS+RDrwcbLh6ae9OehrnQuln0mj6XWCG8yRJggHON 0pj2mXcE83TZsXJ+XFyx2B5Ab/O3ZD3l+KemPRGhyWYRAb4xLaMriSsH93pgR9KJuZE9 yMiHo+XQJe1ULyeEfm3PFiC1JJH0+eqWGovjNWEmDK0d4rHzyZsOvvtoPEw+Bl+fEnGj T70aXIcDaPrG2hp+p06tgaDc78NMCEQ4yfI9X+tHBnhAr+cT+KfhdmpwvJXgtLkumthE OU0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JqXrOW1sz81l7piXeJ6TmVlYLqW03X51G3JR7Qr/jYw=; b=3NMlPSOYk7nv8PmoMxHVQaBDIywu5nMbJYhjx875NMlsNIixHWtzSKxsTf3il3qgEu CHq2ykdYX19bWCkmFXMTGwDl8ZSgpDMCil4HT/C1jv+UlKGVkmPszV91Cb8Kor+zpmPJ GiQZjz86dirbHJ1NKzsG0vHCs6i6HFgNAYXMIgVSahv2S5udfmUk7mbT12zTi1uDBhuj hgzgxa+WrbRyF19m7P2y1Lznj5uIIhSTB0r65FUkBzWWT42HdKls7pPgsqo4SC3DG5Jq NpG7QMsTVgAD7tIl6u80On1ph2b9kIG3SjJwAqwys7JLDdAKvlgntQvd2Rvm+k++4pU4 ccHA== X-Gm-Message-State: AOAM531ew/WfJlLgUTLdq5XB3I6EvVdrgMf2siuzq2givs237NIKSKLU 1GSqhX6air5i8Z7erx30h32I2xMtVSzW X-Received: by 2002:a05:622a:186:: with SMTP id s6mr58015qtw.323.1634140855563; Wed, 13 Oct 2021 09:00:55 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id w17sm20161qts.53.2021.10.13.09.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 09:00:54 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, linux-raid@vger.kernel.org, linux-block@vger.kernel.org, axboe@kernel.dk Cc: Kent Overstreet , alexander.h.duyck@linux.intel.com Subject: [PATCH 5/5] brd: Kill usage of page->index Date: Wed, 13 Oct 2021 12:00:34 -0400 Message-Id: <20211013160034.3472923-6-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211013160034.3472923-1-kent.overstreet@gmail.com> References: <20211013160034.3472923-1-kent.overstreet@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As part of the struct page cleanups underway, we want to remove as much usage of page->mapping and page->index as possible, as frequently they are known from context. In the brd code, we're never actually reading from page->index except in assertions, so references to it can be safely deleted. Signed-off-by: Kent Overstreet --- drivers/block/brd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 58ec167aa0..0a55aed832 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -72,8 +72,6 @@ static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) page = radix_tree_lookup(&brd->brd_pages, idx); rcu_read_unlock(); - BUG_ON(page && page->index != idx); - return page; } @@ -108,12 +106,10 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector) spin_lock(&brd->brd_lock); idx = sector >> PAGE_SECTORS_SHIFT; - page->index = idx; if (radix_tree_insert(&brd->brd_pages, idx, page)) { __free_page(page); page = radix_tree_lookup(&brd->brd_pages, idx); BUG_ON(!page); - BUG_ON(page->index != idx); } else { brd->brd_nr_pages++; } -- 2.33.0