From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: David Howells <dhowells@redhat.com>,
Christian Brauner <christian@brauner.io>,
Jeff Layton <jlayton@kernel.org>,
Dominique Martinet <asmadeus@codewreck.org>
Cc: Steve French <smfrench@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Marc Dionne <marc.dionne@auristor.com>,
Paulo Alcantara <pc@manguebit.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>,
Eric Van Hensbergen <ericvh@kernel.org>,
Ilya Dryomov <idryomov@gmail.com>,
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 <xiang@kernel.org>,
Chao Yu <chao@kernel.org>, Yue Hu <huyue2@coolpad.com>,
Jeffle Xu <jefflexu@linux.alibaba.com>
Subject: Re: [PATCH 3/4] erofs: Don't use certain internal folio_*() functions
Date: Wed, 10 Jan 2024 02:11:08 +0800 [thread overview]
Message-ID: <97d0e776-d672-405a-9359-fb7f16969dc3@linux.alibaba.com> (raw)
In-Reply-To: <20240109180117.1669008-4-dhowells@redhat.com>
On 2024/1/10 02:01, David Howells wrote:
> 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 <willy@infradead.org>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Gao Xiang <xiang@kernel.org>
> cc: Chao Yu <chao@kernel.org>
> cc: Yue Hu <huyue2@coolpad.com>
> cc: Jeffle Xu <jefflexu@linux.alibaba.com>
> cc: linux-erofs@lists.ozlabs.org
> cc: linux-fsdevel@vger.kernel.org
Thank you, David!
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
(I've asked Jingbo to find some free slot to refine
this part for later compressed data adaption. Yet that
is another separate story. The patch looks good to me.)
Thanks,
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);
>
next prev parent reply other threads:[~2024-01-09 18:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 18:01 [PATCH 0/4] netfs, afs, erofs, cifs: " David Howells
2024-01-09 18:01 ` [PATCH 1/4] netfs: " David Howells
2024-01-10 17:25 ` John Stoffel
2024-01-09 18:01 ` [PATCH 2/4] afs: " David Howells
2024-01-09 18:01 ` [PATCH 3/4] erofs: " David Howells
2024-01-09 18:11 ` Gao Xiang [this message]
2024-01-09 18:01 ` [PATCH 4/4] cifs: " David Howells
2024-01-09 18:42 ` [PATCH 0/4] netfs, afs, erofs, " Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97d0e776-d672-405a-9359-fb7f16969dc3@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=asmadeus@codewreck.org \
--cc=ceph-devel@vger.kernel.org \
--cc=chao@kernel.org \
--cc=christian@brauner.io \
--cc=dhowells@redhat.com \
--cc=ericvh@kernel.org \
--cc=huyue2@coolpad.com \
--cc=idryomov@gmail.com \
--cc=jefflexu@linux.alibaba.com \
--cc=jlayton@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pc@manguebit.com \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
--cc=v9fs@lists.linux.dev \
--cc=willy@infradead.org \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox