Skip to content

Commit

Permalink
netfs: Prepare to split read_helper.c
Browse files Browse the repository at this point in the history
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>
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
  • Loading branch information
dhowells committed Mar 9, 2022
1 parent 1529708 commit 45025fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions fs/netfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

#define pr_fmt(fmt) "netfs: " fmt

/*
* buffered_read.c
*/
void netfs_rreq_unlock_folios(struct netfs_io_request *rreq);

/*
* objects.c
*/
Expand Down
4 changes: 2 additions & 2 deletions fs/netfs/read_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -432,7 +432,7 @@ static void netfs_rreq_assess(struct netfs_io_request *rreq, bool was_async)
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);
Expand Down

0 comments on commit 45025fc

Please sign in to comment.