From patchwork Tue Jan 9 18:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13515193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9C92C47079 for ; Tue, 9 Jan 2024 18:01:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4CD286B0096; Tue, 9 Jan 2024 13:01:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 47DB06B0099; Tue, 9 Jan 2024 13:01:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3456B8D0001; Tue, 9 Jan 2024 13:01:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 214C36B0096 for ; Tue, 9 Jan 2024 13:01:59 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 77654A1E52 for ; Tue, 9 Jan 2024 18:01:51 +0000 (UTC) X-FDA: 81660540822.08.940E828 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf22.hostedemail.com (Postfix) with ESMTP id B6823C001C for ; Tue, 9 Jan 2024 18:01:49 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cZUutkf5; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1704823309; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7Xf1sEICUh1u9jN2O9W9Y+tFVYV24JiIia24sIupeow=; b=qgiJckL5usyy29U+bTb2gVdEG8/R2Uop8rXIvkbv6VS0mlSpP5GtzflIoiD4ExK8VTu7m8 CDS1hzipqsNXrQuPFZks9oL/3xIAh2XYcb57BYyKFTV4rQjBtn/pCXXes3WBNjSO/ZTWBw Y4h+cjkOlOIo8HKVDWm+/V71tnxwKFs= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cZUutkf5; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704823309; a=rsa-sha256; cv=none; b=FksBZWZYGh1k5g9Hqi1F+Q0DEZ2EjscShXwdEiA4tg0xN3uCwI5ZgA0QD+6F5U6aDGwQz2 Cv6icm9FNJc4MukgEkDxmAhv4OXmAymfAUjOT6Yk+URyFIeMAUja2bMT8dD4fUvcioVPbi RaZfNTs43hEGJNh4bexslk+MgsRThbs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704823309; 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=7Xf1sEICUh1u9jN2O9W9Y+tFVYV24JiIia24sIupeow=; b=cZUutkf5DEQR/coFNw3VBj6zjpEQOGDa8SI7Ol0qYmZRpBjHdW1GCDdGel3UVNu8RFjUx2 mibFFJl4B02CRCzl4lGSjl75fyyqDnRxSNT3k4WwYhxZ1hrOZs94HRDN3gZJL3oi4OWnB/ AtMkRQ2vYa05n1ksU6OUENEzU5e95rc= 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-208-RosHVIG7NrOQHYngSPvMtw-1; Tue, 09 Jan 2024 13:01:43 -0500 X-MC-Unique: RosHVIG7NrOQHYngSPvMtw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 0453E83BA8F; Tue, 9 Jan 2024 18:01:37 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C42D5012; Tue, 9 Jan 2024 18:01:33 +0000 (UTC) From: David Howells To: Christian Brauner , Jeff Layton , Gao Xiang , Dominique Martinet Cc: David Howells , Steve French , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , linux-cachefs@redhat.com, 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu Subject: [PATCH 3/4] erofs: Don't use certain internal folio_*() functions Date: Tue, 9 Jan 2024 18:01:14 +0000 Message-ID: <20240109180117.1669008-4-dhowells@redhat.com> In-Reply-To: <20240109180117.1669008-1-dhowells@redhat.com> References: <20240109180117.1669008-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B6823C001C X-Stat-Signature: mcrfrwpznsyjkq7m3gy1mm8omzuhfmuh X-Rspam-User: X-HE-Tag: 1704823309-786843 X-HE-Meta: U2FsdGVkX1+EERKKXzElTUYgQ0991ctZi/sruhGrKYWNZ9fRXm3KbkhG0gkd5awMrV+yrpcgsuCUrds4vc0M9IIdX1YE70CcfRCsfAcdkOLDw2cg6L8dKY5WqAIWuTLh6FXU6UH7zxNx4hn+92rPs4usFOxTCgKTdJ6fBjmD0NaBkZmttt6VCiXJUAXVxLJdeifE1knKwN0cfmd9/wOTt3VHjytHyn85keWPCylIRl8O+Jl5q6fjVJAJFHI7c6IjhmkC/wk1iYdZk3gvviMybwcbnnhVgg8hot+65yYrOujdtHJFqjtdigtNa5ppxJ2JLmFmx/DTdVYEmbmHPdGV8lzkT8lnbqyY4r0y7pTVfKKZhTpv+ziX3FbCczRHSaIegp5tml3NFT0mlkD8GakhAg3Ma5f4ae5nyqKPNHamgjRR2Ovd68vZpY08TlNXDNIPLf4AYd+sfNUl8/5AAJ5zRG73oyLAxuj061QpFmz5idHmgleWDLmUavH7e+rid1CarzUcaui0mkN8x8EnI3BpO8fZUblsR8bib6PPSHMoVwZEqR/q/sDVh6XnWEmur21PB5IbFibRh56yyA+Yv6DyT22XJMPlv9CodsqvGZ8GNsvtznz2UfziXambC1AlD3SF1jvoef98ghUJIXlkt+b1uh+Lqq7JCVt8jMfdd9eUxBQW1urL1dKHVA64OtxEDtvGfMOjM0+0ipQaCpl4IoXLBBSbzJWGTr5rYr+moBUHHMJdWqKQT9UT238T9P2T4OPD2T0jYswlFxCe1xF0xywbrVlY/mVQevneJXSO3KDMbsxugk01szknqY6r12YmXwXDUu++J4eJ+pScqc/a/Qbg7SgaTYVa/plrU4EBXDNlCLjhGmjzl+qxQyiwiKrkPhC0Agqb0tzOdrv3UKGm7v+Dt2U9wz8VATBQoEpWUa9Y/VkYM0sLfnlyT4MTJTFna1mC8Md/ayKUVSwDRdjEmKU VaUSY4mK CECkFaZaNBkMvvT7183ELcfdVrxvaxgdDpYkRf6eZLRDSaWHXzxtAVeQdNmCxWI9jjg5J6vsP5wqUNDD/gDAC1pSyE87/iYQd4VrAeRTpbFZ2G4RRY7dzg248Kl/a4gDOYK3lvkqBsbtam15rFxLBhwZDQvIaCeWUJiq7j2iuS6SCoYgGu/e7gIgJyNjVDLCRq1AxoCKBpR7NWHQTXWK1c+yC4yFEmuQ3keWb0N2ZCfhbrDQjpHdjhcTM5N+Jj6JOX0Zw0EfbjH/4MuWWAVleZNyJ1UQnUXJMtFUSV1pqfevR6m+bEp1v6CZ+Rru/WTLDw+T8xBWDSMJcOgcqddM8JE/BP3GQhNHptBOzCEOSng1PsYoyPKWuqgZg9bhMoe8feUqnIp14goUm01GWyKu1cg0Tk7McKeN5i98R6fQlFrh1hoYmt32VXPLHqb/RjcFK5rEQjciP/9MvVL3MRwPeFywqpvTjWBks+DFM 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: List-Subscribe: List-Unsubscribe: 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/erofs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/erofs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/erofs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Gao Xiang cc: Chao Yu cc: Yue Hu cc: Jeffle Xu cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org Reviewed-by: Gao Xiang --- fs/erofs/fscache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 87ff35bff8d5..bc12030393b2 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -165,10 +165,10 @@ static int erofs_fscache_read_folios_async(struct fscache_cookie *cookie, static int erofs_fscache_meta_read_folio(struct file *data, struct folio *folio) { int ret; - struct erofs_fscache *ctx = folio_mapping(folio)->host->i_private; + struct erofs_fscache *ctx = folio->mapping->host->i_private; struct erofs_fscache_request *req; - req = erofs_fscache_req_alloc(folio_mapping(folio), + req = erofs_fscache_req_alloc(folio->mapping, folio_pos(folio), folio_size(folio)); if (IS_ERR(req)) { folio_unlock(folio); @@ -276,7 +276,7 @@ static int erofs_fscache_read_folio(struct file *file, struct folio *folio) struct erofs_fscache_request *req; int ret; - req = erofs_fscache_req_alloc(folio_mapping(folio), + req = erofs_fscache_req_alloc(folio->mapping, folio_pos(folio), folio_size(folio)); if (IS_ERR(req)) { folio_unlock(folio);