diff options
author | David Howells <dhowells@redhat.com> | 2024-07-09 09:47:17 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-09-05 11:00:42 +0200 |
commit | 24c90a79f6068d309adda05d871855414bb75283 (patch) | |
tree | e5328ece90959ef717585392d0f61053aebadd0d /fs/netfs/io.c | |
parent | c57de2a9259d7dc18a7a425fca91c77502263d8a (diff) | |
download | linux-stable-24c90a79f6068d309adda05d871855414bb75283.tar.gz linux-stable-24c90a79f6068d309adda05d871855414bb75283.tar.bz2 linux-stable-24c90a79f6068d309adda05d871855414bb75283.zip |
netfs: Set the request work function upon allocation
Set the work function in the netfs_io_request work_struct when we allocate
the request rather than doing this later. This reduces the number of
places we need to set it in future code.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-11-dhowells@redhat.com/ # v2
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/netfs/io.c')
-rw-r--r-- | fs/netfs/io.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/netfs/io.c b/fs/netfs/io.c index ad9580c2dd6c..08f0b985d436 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -426,7 +426,7 @@ again: netfs_rreq_completed(rreq, was_async); } -static void netfs_rreq_work(struct work_struct *work) +void netfs_rreq_work(struct work_struct *work) { struct netfs_io_request *rreq = container_of(work, struct netfs_io_request, work); @@ -739,8 +739,6 @@ int netfs_begin_read(struct netfs_io_request *rreq, bool sync) // TODO: Use bounce buffer if requested rreq->io_iter = rreq->iter; - INIT_WORK(&rreq->work, netfs_rreq_work); - /* Chop the read into slices according to what the cache and the netfs * want and submit each one. */ |