summaryrefslogtreecommitdiff
path: root/fs/netfs/objects.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-03-21 10:16:55 +0000
committerDavid Howells <dhowells@redhat.com>2024-04-29 15:01:44 +0100
commit120b878158cb2e98b167fef038f81c05efe2fd14 (patch)
tree2fb3e4fd968b41f9a120cf773c4673aec24437a4 /fs/netfs/objects.c
parent93bf1cc0096fa1e02244078db3334ca7fa1d88c1 (diff)
netfs: Use subreq_counter to allocate subreq debug_index values
Use the subreq_counter in netfs_io_request to allocate subrequest debug_index values in read ops as well as write ops. 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
Diffstat (limited to 'fs/netfs/objects.c')
-rw-r--r--fs/netfs/objects.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c
index 72b52f070270..8acc03a64059 100644
--- a/fs/netfs/objects.c
+++ b/fs/netfs/objects.c
@@ -152,6 +152,7 @@ struct netfs_io_subrequest *netfs_alloc_subrequest(struct netfs_io_request *rreq
INIT_LIST_HEAD(&subreq->rreq_link);
refcount_set(&subreq->ref, 2);
subreq->rreq = rreq;
+ subreq->debug_index = atomic_inc_return(&rreq->subreq_counter);
netfs_get_request(rreq, netfs_rreq_trace_get_subreq);
netfs_stat(&netfs_n_rh_sreq);
}