Blob Blame History Raw
From: David Howells <dhowells@redhat.com>
Date: Tue, 1 Mar 2022 15:55:15 +0000
Subject: netfs: Prepare to split read_helper.c
Git-commit: 93345c3ba55f62f6b7189cdab354c7293fd45d75
Patch-mainline: v5.18-rc1
References: jsc#SES-1880

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
[don't really add 'folio' to the function name]
Acked-by: Luis Henriques <lhenriques@suse.com>
---
 fs/netfs/internal.h    |    5 +++++
 fs/netfs/read_helper.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- 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(struct netfs_io_request *rreq);
+
+/*
  * objects.c
  */
 struct netfs_io_request *netfs_alloc_request(struct address_space *mapping,
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -250,7 +250,7 @@ static void netfs_rreq_write_to_cache(st
  * Unlock the pages in a read operation.  We need to set PG_fscache on any
  * pages we're going to write back before we unlock them.
  */
-static void netfs_rreq_unlock(struct netfs_io_request *rreq)
+void netfs_rreq_unlock(struct netfs_io_request *rreq)
 {
 	struct netfs_io_subrequest *subreq;
 	struct page *page;