aboutsummaryrefslogtreecommitdiff
path: root/fs/netfs/internal.h
diff options
context:
space:
mode:
authorGravatar David Howells <dhowells@redhat.com> 2022-03-02 10:50:22 +0000
committerGravatar David Howells <dhowells@redhat.com> 2022-03-18 09:29:05 +0000
commit4090b31422a6f24dfe701e31ffec7ba5804a7e2f (patch)
tree51494064485647840568ce41531bbf66cf5aec2e /fs/netfs/internal.h
parentnetfs: Add a netfs inode context (diff)
downloadlinux-4090b31422a6f24dfe701e31ffec7ba5804a7e2f.tar.gz
linux-4090b31422a6f24dfe701e31ffec7ba5804a7e2f.tar.bz2
linux-4090b31422a6f24dfe701e31ffec7ba5804a7e2f.zip
netfs: Add a function to consolidate beginning a read
Add a function to do the steps needed to begin a read request, allowing this code to be removed from several other functions and consolidated. Changes ======= ver #2) - Move before the unstaticking patch so that some functions can be left static. - Set uninitialised return code in netfs_begin_read()[1][2]. - Fixed a refleak caused by non-removal of a get from netfs_write_begin() when the request submission code got moved to netfs_begin_read(). - Use INIT_WORK() to (re-)init the request work_struct[3]. 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/20220303163826.1120936-1-nathan@kernel.org/ [1] Link: https://lore.kernel.org/r/20220303235647.1297171-1-colin.i.king@gmail.com/ [2] Link: https://lore.kernel.org/r/9d69be49081bccff44260e4c6e0049c63d6d04a1.camel@redhat.com/ [3] Link: https://lore.kernel.org/r/164623004355.3564931.7275693529042495641.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/164678214287.1200972.16734134007649832160.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/164692911113.2099075.1060868473229451371.stgit@warthog.procyon.org.uk/ # v3
Diffstat (limited to 'fs/netfs/internal.h')
-rw-r--r--fs/netfs/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h
index 54c761bcc8e6..54faf0c72297 100644
--- a/fs/netfs/internal.h
+++ b/fs/netfs/internal.h
@@ -39,7 +39,7 @@ static inline void netfs_see_request(struct netfs_io_request *rreq,
*/
extern unsigned int netfs_debug;
-void netfs_rreq_work(struct work_struct *work);
+int netfs_begin_read(struct netfs_io_request *rreq, bool sync);
/*
* stats.c