Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp295598rdb; Mon, 22 Jan 2024 04:40:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWlBHo87g/yCjVZBtiQ32u0aUQ3jcbCqiAbX38P4ddVpMWI0Qkzj1/DxHu/DioA1Z+92uk X-Received: by 2002:a17:906:99d6:b0:a30:538c:a27d with SMTP id s22-20020a17090699d600b00a30538ca27dmr1285190ejn.37.1705927208957; Mon, 22 Jan 2024 04:40:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705927208; cv=pass; d=google.com; s=arc-20160816; b=S8wfR+2AakB59sgbuGqVEl/PYb6vSa5Ce1RvwGi/r5xMPvJPLJDp95b+pc19CGwVnH TgRmX4poHrx60VJPcTBLqC+bynM0XH5S1GmSb1apf5F5ZRTTeEO+uTWMZsRyH6l/zQ17 KBb9o2EZaIrBwIgsjn/ZuGw78C5yZyf2BOryWqQhi8E9ZSVrzu7jrhzkBTapz9lpPapb 8l755i956DCMHXKek46SrBaoUVnOna7KBYCUNIenG/LEFsK6AktimYE6SqsNHvD1pk/7 K8cyXdc5h2MtE2fAofTgJOTx6i/IaxWTKwGFPjDEVC0lZRkqGqbErTyERXxClrGEzY2S x8cQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tRDq2jwLFhb5pXOHdUvfqCYrkV16pIgDVznzrFSoQl0=; fh=jD/G7UrdWzQUaVcsyZL0Br5qChVzoyKXvXZLpQibT6A=; b=B01O1ihAOd4gGhX0WCu91nh26aKf7tRXCIQ0947nzlovlyolPALQ/kedjoiqbIpFGY I2f7gpq4qE6s4ePOAop2SXJW3jKEHJEh3Q9oqmnCRl9lIUltfZW5PN22wcct1KKQasm3 01E6K+E6Hx1lcubrRki942VY/rYzR2tIWpUVRZMKoudXgn6zTafO7W9nneBeM26KL4gF D/cWPknKu7TMrlRqIKSrufzVH+UB9g6d3X/DR5EyeyfhKmCEMi7guZzUekDdrm1YvGoH zRokRxloEZc82iBOpbXwZlLId/0Xm7gETGcxDoNqDW3O4rS/w+omwtuiZXWq9Ctp2/Sv 5AvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xby1Pxy0; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-1226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d4-20020a170906344400b00a2a4a9e8b92si10252422ejb.940.2024.01.22.04.40.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 04:40:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xby1Pxy0; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-1226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B41051F26445 for ; Mon, 22 Jan 2024 12:40:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 049C93D0CB; Mon, 22 Jan 2024 12:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Xby1Pxy0" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6176A3CF74 for ; Mon, 22 Jan 2024 12:39:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705927142; cv=none; b=Ucyox57CjobJIgfVRynCgdD5RLXVhCgXiIgAVz0XPrXpA3AXJEngioZBQqEfwGvShl9OHtHgrQ7xbWtnKtaaaZT7n94ONIV0EnOR+QKK7y8dy60vyRnHfwQkKCZkTJ+gWNeCGgz/s5AT/N2Z5NNK3vQ384RkrBsACDPA2jSLki0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705927142; c=relaxed/simple; bh=CdM3lxlK9vcJeCO2IK7GXCEzdfzkbynGeoA3AgUb0Eg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uYFS8OFuKZm/rqjGn04TV2LewoRQJER+t4vhUsdv1Ncg+DSIXo4vinwJC5zUU4OY/DK+DLqGW1WulDNnPKWpXDdPVf99s/FkODbIZj9sqzdmJgTo3ew/ViieqWPm4NRW9KVnYhWE/cW1a1cGIUJm8BXHtDC5Uq4koMa0WIEzbGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Xby1Pxy0; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705927140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tRDq2jwLFhb5pXOHdUvfqCYrkV16pIgDVznzrFSoQl0=; b=Xby1Pxy0ZS/j7+j6uo2ikZuw/ipHl2qwRAsS/ipAxXzYRCTDjLFH7WDDdQQMV1Y/dnAObb QGPvDc4DOmbjxQKui8HbNAg1mtg8jM/wpC8ygDLM995nm9Clkz1/TTE17YkLraAVuFQZWq BDWVoc9eXP8En+HSO5hKwwPhZ3fPoG8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-UOC2OtDLMeOsQR0hPiJYIA-1; Mon, 22 Jan 2024 07:38:57 -0500 X-MC-Unique: UOC2OtDLMeOsQR0hPiJYIA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 840ED83106D; Mon, 22 Jan 2024 12:38:56 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0F1C2166B31; Mon, 22 Jan 2024 12:38:54 +0000 (UTC) From: David Howells To: Christian Brauner Cc: David Howells , Jeff Layton , Matthew Wilcox , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Marc Dionne Subject: [PATCH 02/10] afs: Don't use certain internal folio_*() functions Date: Mon, 22 Jan 2024 12:38:35 +0000 Message-ID: <20240122123845.3822570-3-dhowells@redhat.com> In-Reply-To: <20240122123845.3822570-1-dhowells@redhat.com> References: <20240122123845.3822570-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Filesystems should not be using folio->index not folio_index(folio) and folio->mapping, not folio_mapping() or folio_file_mapping() in filesystem code. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/afs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org --- fs/afs/dir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index c14533ef108f..3f73d61f7c8a 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -124,7 +124,7 @@ static void afs_dir_read_cleanup(struct afs_read *req) if (xas_retry(&xas, folio)) continue; BUG_ON(xa_is_value(folio)); - ASSERTCMP(folio_file_mapping(folio), ==, mapping); + ASSERTCMP(folio->mapping, ==, mapping); folio_put(folio); } @@ -202,12 +202,12 @@ static void afs_dir_dump(struct afs_vnode *dvnode, struct afs_read *req) if (xas_retry(&xas, folio)) continue; - BUG_ON(folio_file_mapping(folio) != mapping); + BUG_ON(folio->mapping != mapping); size = min_t(loff_t, folio_size(folio), req->actual_len - folio_pos(folio)); for (offset = 0; offset < size; offset += sizeof(*block)) { block = kmap_local_folio(folio, offset); - pr_warn("[%02lx] %32phN\n", folio_index(folio) + offset, block); + pr_warn("[%02lx] %32phN\n", folio->index + offset, block); kunmap_local(block); } } @@ -233,7 +233,7 @@ static int afs_dir_check(struct afs_vnode *dvnode, struct afs_read *req) if (xas_retry(&xas, folio)) continue; - BUG_ON(folio_file_mapping(folio) != mapping); + BUG_ON(folio->mapping != mapping); if (!afs_dir_check_folio(dvnode, folio, req->actual_len)) { afs_dir_dump(dvnode, req); @@ -2022,7 +2022,7 @@ static bool afs_dir_release_folio(struct folio *folio, gfp_t gfp_flags) { struct afs_vnode *dvnode = AFS_FS_I(folio_inode(folio)); - _enter("{{%llx:%llu}[%lu]}", dvnode->fid.vid, dvnode->fid.vnode, folio_index(folio)); + _enter("{{%llx:%llu}[%lu]}", dvnode->fid.vid, dvnode->fid.vnode, folio->index); folio_detach_private(folio);