mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: dhowells@redhat.com, xiang@kernel.org, chao@kernel.org,
	linux-erofs@lists.ozlabs.org
Cc: jlayton@kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/2] netfs: export helpers for request and subrequest
Date: Fri, 21 Oct 2022 16:49:11 +0800	[thread overview]
Message-ID: <20221021084912.61468-2-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <20221021084912.61468-1-jefflexu@linux.alibaba.com>

Export netfs_put_subrequest() and netfs_rreq_completed().

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
 fs/netfs/io.c         | 3 ++-
 fs/netfs/objects.c    | 1 +
 include/linux/netfs.h | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index 428925899282..58dd56e3e780 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -94,12 +94,13 @@ static void netfs_read_from_server(struct netfs_io_request *rreq,
 /*
  * Release those waiting.
  */
-static void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async)
+void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async)
 {
 	trace_netfs_rreq(rreq, netfs_rreq_trace_done);
 	netfs_clear_subrequests(rreq, was_async);
 	netfs_put_request(rreq, was_async, netfs_rreq_trace_put_complete);
 }
+EXPORT_SYMBOL(netfs_rreq_completed);
 
 /*
  * Deal with the completion of writing the data to the cache.  We have to clear
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c
index e17cdf53f6a7..478cc1a1664c 100644
--- a/fs/netfs/objects.c
+++ b/fs/netfs/objects.c
@@ -158,3 +158,4 @@ void netfs_put_subrequest(struct netfs_io_subrequest *subreq, bool was_async,
 	if (dead)
 		netfs_free_subrequest(subreq, was_async);
 }
+EXPORT_SYMBOL(netfs_put_subrequest);
diff --git a/include/linux/netfs.h b/include/linux/netfs.h
index f2402ddeafbf..d519fb709d7f 100644
--- a/include/linux/netfs.h
+++ b/include/linux/netfs.h
@@ -282,6 +282,8 @@ int netfs_write_begin(struct netfs_inode *, struct file *,
 		struct address_space *, loff_t pos, unsigned int len,
 		struct folio **, void **fsdata);
 
+void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async);
+
 void netfs_subreq_terminated(struct netfs_io_subrequest *, ssize_t, bool);
 void netfs_get_subrequest(struct netfs_io_subrequest *subreq,
 			  enum netfs_sreq_ref_trace what);
-- 
2.19.1.6.gb485710b


  reply	other threads:[~2022-10-21  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  8:49 [PATCH 0/2] netfs,erofs: reuse netfs_put_subrequest() and Jingbo Xu
2022-10-21  8:49 ` Jingbo Xu [this message]
2022-10-21  9:04   ` [PATCH 1/2] netfs: export helpers for request and subrequest Gao Xiang
2022-10-21  8:49 ` [PATCH 2/2] erofs: use netfs helpers manipulating " Jingbo Xu
2022-10-21  9:09   ` Gao Xiang
2022-10-21 12:38   ` Jeff Layton
2022-10-21 13:55     ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221021084912.61468-2-jefflexu@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®