Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4594074pxb; Thu, 14 Oct 2021 08:13:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3TPUoMEfNbM4idgcyjdhckba4etuRRC3Tzwj8ahDdPflxLA4rpPQ7wb30MtomX3a8HRsG X-Received: by 2002:a05:6402:90c:: with SMTP id g12mr9354364edz.139.1634224397186; Thu, 14 Oct 2021 08:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634224397; cv=none; d=google.com; s=arc-20160816; b=TgrlSacs6eB2SYQ40KQisHMO8rfE6nQF5/ZSr6Uhe2NlHVD9NT47WqtHDYkwKjbEwz 4oLK9oHiS6Fqtarni/ZiYo+bPqwBRUbm+etg/TEuo9cKSacnRl+5UWqv4UGNWAZVkf+f oMfBlQfwncNHVPMuormDuK1iLwUSuHabT5eCyOrah0LdzOiQ4bu0FZNoIMsNyJz8RzkO Q3996R4l5ikcEgNdWm0occyL9Bea4s6jv+SZ2KoxwnA6p/zYeH1WsuyQQ6x+qgAqBOmM bkNcNjQ2IQjFj7DQVPX7S9Ohv3nA6gR8+dAmibznD6DIn31T86FabyDQy8IMo6HIFyqG w5lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=jTxRkwer/L1jMFbVHe+gmT8Lx5IDhS6y3cTZBhYxWZc=; b=SNmAie4PUKZRzxnwMNX0Tnjz12kvXbE0n7ERZseBCwaShaGocvRW63UkF4BnknVwTW h2VEPV18Ad4J+RJ6SugCLoK5k9Bzn/bWAVH7/IFPNgTA0xxqEJMtG8b++1b4YGmBN1Yi c39bqR94hXEyKZszZcpKvaU3WxWswNgDW/0av3lgM+WuXe+2Zg5kuGg433noU0SYAwzE jtFT0QwqEAsPmeVj+a/S8+6v5KY1K1I26dyyY3IbUeqvlPM2UVRB/5I6B4+ct7XfWB54 dBWRdkMaox1lIj4H+DRc+tfZOmZi+AOoouYS0t+WdQO9Y8HGmwOYMj4bzJPHl7rKns2C g+7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GUA6a2DS; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si6165606edf.56.2021.10.14.08.12.51; Thu, 14 Oct 2021 08:13:17 -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=@redhat.com header.s=mimecast20190719 header.b=GUA6a2DS; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232231AbhJNPMR (ORCPT + 99 others); Thu, 14 Oct 2021 11:12:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51439 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232991AbhJNPMB (ORCPT ); Thu, 14 Oct 2021 11:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634224196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jTxRkwer/L1jMFbVHe+gmT8Lx5IDhS6y3cTZBhYxWZc=; b=GUA6a2DSv/2Thu7sJktpbXcgV8Bc6FM9e1iH1yNM3Pl6HyarmH2VhqM6nqzRfWxf9Hy154 QqK+yKOsGlsn57mZ5qGVLvkIk7/KkhNyBziPYQAngryjFDvcawZE8ZGd3ZEhULs0Cj2HMP 63/l0Q7sVv7n5jlsuiOtV09YW9NlEqo= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-581-NDqmwTwsMT-cC5hlJUfdKw-1; Thu, 14 Oct 2021 11:09:53 -0400 X-MC-Unique: NDqmwTwsMT-cC5hlJUfdKw-1 Received: by mail-wr1-f70.google.com with SMTP id 41-20020adf812c000000b00160dfbfe1a2so4826743wrm.3 for ; Thu, 14 Oct 2021 08:09:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=jTxRkwer/L1jMFbVHe+gmT8Lx5IDhS6y3cTZBhYxWZc=; b=qTpaEadwRq15cnA8WGHzu+N54PLsGFbx6rZ0kjtaV9NOLTDmRgbcd+BRoFzNpOOooj g4mcYfLV7rDQz1LFz4xtL8pz049ORUU1beaFsJkqV5iODe2aVmENRQOewd08Yii0GAeD EswapToaaX7ZjzwcHPe2JCNgbmna8W3DB3bUcREiigR6JitLo6f/puYc/AdaNezsilWw k6NPqT4HWyxW7P1iezFT3yZMyyXoj9QXBso5mwxVXbbOwN+2vNlcciJYvaywWQGktvgw FIjsPh/BK0lY8O2nZtFz15aAbtoCtYbCPb8GGPw3B1yII1EDRrsL+mI/SeGpg2I0K+2D uvlA== X-Gm-Message-State: AOAM53296g7Co8KrVU6dbFY2dbDfPI6/efakRZhyLerlIebTdspxPt8E pGOdlhUoOwpd8ikngQoSphTJ6gBftLqOSV9+hg6+euv/OJuz3IbAejt6DZjKySO4vnEWzZgq4s5 rBeW1YffSQQHdOjEysYZnU3s0 X-Received: by 2002:a1c:29c7:: with SMTP id p190mr6271733wmp.65.1634224192157; Thu, 14 Oct 2021 08:09:52 -0700 (PDT) X-Received: by 2002:a1c:29c7:: with SMTP id p190mr6271697wmp.65.1634224191871; Thu, 14 Oct 2021 08:09:51 -0700 (PDT) Received: from [192.168.3.132] (p5b0c694e.dip0.t-ipconnect.de. [91.12.105.78]) by smtp.gmail.com with ESMTPSA id p25sm7981463wma.2.2021.10.14.08.09.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Oct 2021 08:09:51 -0700 (PDT) Message-ID: Date: Thu, 14 Oct 2021 17:09:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 5/5] brd: Kill usage of page->index Content-Language: en-US To: Kent Overstreet , 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: alexander.h.duyck@linux.intel.com References: <20211013160034.3472923-1-kent.overstreet@gmail.com> <20211013160034.3472923-6-kent.overstreet@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20211013160034.3472923-6-kent.overstreet@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.10.21 18:00, Kent Overstreet wrote: > 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++; > } > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb