summaryrefslogtreecommitdiff
path: root/fs/netfs/output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-03-18 20:15:57 +0300
committerDavid Howells <dhowells@redhat.com>2024-04-29 17:01:43 +0300
commit93bf1cc0096fa1e02244078db3334ca7fa1d88c1 (patch)
tree04f622dbcd718b02836646d53de1f5e8afd3fd4e /fs/netfs/output.c
parentae678317b95e760607c7b20b97c9cd4ca9ed6e1a (diff)
downloadlinux-93bf1cc0096fa1e02244078db3334ca7fa1d88c1.tar.xz
netfs: Make netfs_io_request::subreq_counter an atomic_t
Make the netfs_io_request::subreq_counter, used to generate values for netfs_io_subrequest::debug_index, into an atomic_t so that it can be called from the retry thread at the same time as the app thread issuing writes. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org
Diffstat (limited to 'fs/netfs/output.c')
-rw-r--r--fs/netfs/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/output.c b/fs/netfs/output.c
index 625eb68f3e5a..fbdbb4f78234 100644
--- a/fs/netfs/output.c
+++ b/fs/netfs/output.c
@@ -37,7 +37,7 @@ struct netfs_io_subrequest *netfs_create_write_request(struct netfs_io_request *
subreq->source = dest;
subreq->start = start;
subreq->len = len;
- subreq->debug_index = wreq->subreq_counter++;
+ subreq->debug_index = atomic_inc_return(&wreq->subreq_counter);
switch (subreq->source) {
case NETFS_UPLOAD_TO_SERVER: