summaryrefslogtreecommitdiff
path: root/fs/netfs/misc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-01-09 20:17:36 +0300
committerDavid Howells <dhowells@redhat.com>2024-01-23 00:56:11 +0300
commit202bc57b675601bc07b5942369ecc16af64d1b95 (patch)
treed1a5d76e66889ecd2948c8d30d60efcfc4b04a87 /fs/netfs/misc.c
parent6613476e225e090cc9aad49be7fa504e290dd33d (diff)
downloadlinux-202bc57b675601bc07b5942369ecc16af64d1b95.tar.xz
netfs: Don't use certain unnecessary folio_*() functions
Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know that it's in the pagecache. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/netfs/*.c Reported-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: David Howells <dhowells@redhat.com> cc: Jeff Layton <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
Diffstat (limited to 'fs/netfs/misc.c')
-rw-r--r--fs/netfs/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/misc.c b/fs/netfs/misc.c
index 0e3af37fc924..90051ced8e2a 100644
--- a/fs/netfs/misc.c
+++ b/fs/netfs/misc.c
@@ -180,7 +180,7 @@ void netfs_invalidate_folio(struct folio *folio, size_t offset, size_t length)
struct netfs_folio *finfo = NULL;
size_t flen = folio_size(folio);
- _enter("{%lx},%zx,%zx", folio_index(folio), offset, length);
+ _enter("{%lx},%zx,%zx", folio->index, offset, length);
folio_wait_fscache(folio);