summaryrefslogtreecommitdiffstats
path: root/fs/netfs/io.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/io.c
parent93bf1cc0096fa1e02244078db3334ca7fa1d88c1 (diff)
downloadlinux-stable-120b878158cb2e98b167fef038f81c05efe2fd14.tar.gz
linux-stable-120b878158cb2e98b167fef038f81c05efe2fd14.tar.bz2
linux-stable-120b878158cb2e98b167fef038f81c05efe2fd14.zip
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/io.c')
-rw-r--r--fs/netfs/io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index 2641238aae82..8de581ac0cfb 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -501,8 +501,7 @@ out:
* Slice off a piece of a read request and submit an I/O request for it.
*/
static bool netfs_rreq_submit_slice(struct netfs_io_request *rreq,
- struct iov_iter *io_iter,
- unsigned int *_debug_index)
+ struct iov_iter *io_iter)
{
struct netfs_io_subrequest *subreq;
enum netfs_io_source source;
@@ -511,7 +510,6 @@ static bool netfs_rreq_submit_slice(struct netfs_io_request *rreq,
if (!subreq)
return false;
- subreq->debug_index = (*_debug_index)++;
subreq->start = rreq->start + rreq->submitted;
subreq->len = io_iter->count;
@@ -565,7 +563,6 @@ subreq_failed:
int netfs_begin_read(struct netfs_io_request *rreq, bool sync)
{
struct iov_iter io_iter;
- unsigned int debug_index = 0;
int ret;
_enter("R=%x %llx-%llx",
@@ -596,7 +593,7 @@ int netfs_begin_read(struct netfs_io_request *rreq, bool sync)
if (rreq->origin == NETFS_DIO_READ &&
rreq->start + rreq->submitted >= rreq->i_size)
break;
- if (!netfs_rreq_submit_slice(rreq, &io_iter, &debug_index))
+ if (!netfs_rreq_submit_slice(rreq, &io_iter))
break;
if (test_bit(NETFS_RREQ_BLOCKED, &rreq->flags) &&
test_bit(NETFS_RREQ_NONBLOCK, &rreq->flags))