summaryrefslogtreecommitdiff
path: root/fs/netfs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-03-01 15:55:15 +0000
committerDavid Howells <dhowells@redhat.com>2022-03-18 09:29:05 +0000
commit93345c3ba55f62f6b7189cdab354c7293fd45d75 (patch)
tree5c7d894b410c8113fb7d888d8f573201b00496a2 /fs/netfs
parent4090b31422a6f24dfe701e31ffec7ba5804a7e2f (diff)
netfs: Prepare to split read_helper.c
Rename netfs_rreq_unlock() to netfs_rreq_unlock_folios() to make it sound less like it's dropping a lock on an netfs_io_request struct. Remove the 'static' marker on netfs_rreq_unlock_folios() and declaring it in internal.h preparatory to splitting the file. Changes ======= ver #2) - Slide this patch to after the one adding netfs_begin_read(). - As a consequence, don't need to unstatic so many functions. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/164623002861.3564931.17340149482236413375.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/164678215208.1200972.9761906209395002182.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/164692912709.2099075.4349905992838317797.stgit@warthog.procyon.org.uk/ # v3
Diffstat (limited to 'fs/netfs')
-rw-r--r--fs/netfs/internal.h5
-rw-r--r--fs/netfs/read_helper.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h
index 54faf0c72297..7bf94a3beb98 100644
--- a/fs/netfs/internal.h
+++ b/fs/netfs/internal.h
@@ -16,6 +16,11 @@
#define pr_fmt(fmt) "netfs: " fmt
/*
+ * buffered_read.c
+ */
+void netfs_rreq_unlock_folios(struct netfs_io_request *rreq);
+
+/*
* objects.c
*/
struct netfs_io_request *netfs_alloc_request(struct address_space *mapping,
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index 8a4cebf5eb89..80a106b46051 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -250,7 +250,7 @@ static void netfs_rreq_write_to_cache(struct netfs_io_request *rreq)
* Unlock the folios in a read operation. We need to set PG_fscache on any
* folios we're going to write back before we unlock them.
*/
-static void netfs_rreq_unlock(struct netfs_io_request *rreq)
+void netfs_rreq_unlock_folios(struct netfs_io_request *rreq)
{
struct netfs_io_subrequest *subreq;
struct folio *folio;
@@ -432,7 +432,7 @@ again:
return;
}
- netfs_rreq_unlock(rreq);
+ netfs_rreq_unlock_folios(rreq);
clear_bit_unlock(NETFS_RREQ_IN_PROGRESS, &rreq->flags);
wake_up_bit(&rreq->flags, NETFS_RREQ_IN_PROGRESS);