diff options
author | David Howells <dhowells@redhat.com> | 2022-02-25 11:19:14 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-24 15:08:50 +0000 |
commit | 5f5ce7ba15e7e6a6539ac8e1f845757aaebecf0d (patch) | |
tree | 756df4a62710948cc09d95183dc6f58f770a7432 /fs | |
parent | cc3cb0a18da46a51d9fc173155576ba1d068e536 (diff) |
netfs: Add a ->free_subrequest() op
Add a ->free_subrequest() op so that the netfs can clean up data attached
to a subrequest.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/netfs/objects.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index c4229c5f3f54..1bd20bdad983 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -145,6 +145,8 @@ static void netfs_free_subrequest(struct netfs_io_subrequest *subreq, struct netfs_io_request *rreq = subreq->rreq; trace_netfs_sreq(subreq, netfs_sreq_trace_free); + if (rreq->netfs_ops->free_subrequest) + rreq->netfs_ops->free_subrequest(subreq); kfree(subreq); netfs_stat_d(&netfs_n_rh_sreq); netfs_put_request(rreq, was_async, netfs_rreq_trace_put_subreq); |