diff options
author | David Howells <dhowells@redhat.com> | 2024-01-09 18:17:36 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2024-01-22 22:56:11 +0100 |
commit | 202bc57b675601bc07b5942369ecc16af64d1b95 (patch) | |
tree | d1a5d76e66889ecd2948c8d30d60efcfc4b04a87 /fs/netfs/io.c | |
parent | Linux 6.8-rc1 (diff) | |
download | linux-202bc57b675601bc07b5942369ecc16af64d1b95.tar.xz linux-202bc57b675601bc07b5942369ecc16af64d1b95.zip |
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/io.c')
-rw-r--r-- | fs/netfs/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 4309edf33862..e8ff1e61ce79 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -124,7 +124,7 @@ static void netfs_rreq_unmark_after_write(struct netfs_io_request *rreq, /* We might have multiple writes from the same huge * folio, but we mustn't unlock a folio more than once. */ - if (have_unlocked && folio_index(folio) <= unlocked) + if (have_unlocked && folio->index <= unlocked) continue; unlocked = folio_next_index(folio) - 1; trace_netfs_folio(folio, netfs_folio_trace_end_copy); |